Skip to content

Commit 6145bdb

Browse files
committed
Enable statistics for caching-defined Regions.
Resolves spring-projectsgh-518.
1 parent 5c199d2 commit 6145bdb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: spring-data-geode/src/main/java/org/springframework/data/gemfire/config/annotation/CachingDefinedRegionsConfiguration.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ public class CachingDefinedRegionsConfiguration extends AbstractAnnotationConfig
117117

118118
private ClientRegionShortcut clientRegionShortcut = ClientRegionShortcut.PROXY;
119119

120-
private CompositeLifecycle compositeLifecycle = new CompositeLifecycle();
120+
private final CompositeLifecycle compositeLifecycle = new CompositeLifecycle();
121121

122122
@Autowired(required = false)
123-
private List<RegionConfigurer> regionConfigurers = Collections.emptyList();
123+
private final List<RegionConfigurer> regionConfigurers = Collections.emptyList();
124124

125125
private RegionShortcut serverRegionShortcut = RegionShortcut.PARTITION;
126126

@@ -314,6 +314,7 @@ private ConfigurableBeanFactory registerRegionBeans(Set<String> cacheNames, Conf
314314
regionFactoryBean.setRegionConfigurers(resolveRegionConfigurers());
315315
regionFactoryBean.setRegionName(cacheName);
316316
regionFactoryBean.setServerRegionShortcut(resolveServerRegionShortcut());
317+
regionFactoryBean.setStatisticsEnabled(true);
317318

318319
String poolName = resolvePoolName();
319320

@@ -391,6 +392,7 @@ protected final Class<? extends Annotation> getAnnotationType() {
391392

392393
protected abstract Class<? extends Annotation>[] getMethodCacheAnnotationTypes();
393394

395+
@SuppressWarnings("rawtypes")
394396
protected Class[] append(Class[] annotationTypes, Class... additionalAnnotationTypes) {
395397

396398
List<Class> annotationTypeList = new ArrayList<>(Arrays.asList(annotationTypes));

Diff for: spring-data-geode/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCachingDefinedRegions.java

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
package org.springframework.data.gemfire.config.annotation;
1817

1918
import java.lang.annotation.Documented;

0 commit comments

Comments
 (0)