Skip to content

Commit 5c199d2

Browse files
committed
Declare getter and setter for statisticsEnabled.
Set statisticsEnabled property for client and peer (server) Regions. Resolves spring-projectsgh-518.
1 parent 288b851 commit 5c199d2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
1817
package org.springframework.data.gemfire.config.annotation.support;
1918

2019
import static org.springframework.data.gemfire.util.ArrayUtils.nullSafeArray;
@@ -171,6 +170,7 @@ protected Region<K, V> newClientRegion(GemFireCache gemfireCache, String regionN
171170
clientRegionFactory.setRegionConfigurers(this.regionConfigurers);
172171
clientRegionFactory.setRegionName(regionName);
173172
clientRegionFactory.setShortcut(getClientRegionShortcut());
173+
clientRegionFactory.setStatisticsEnabled(getStatisticsEnabled());
174174
clientRegionFactory.setValueConstraint(getValueConstraint());
175175

176176
getPoolName().ifPresent(clientRegionFactory::setPoolName);
@@ -228,6 +228,7 @@ protected Region<K, V> newServerRegion(GemFireCache gemfireCache, String regionN
228228
serverRegionFactory.setRegionConfigurers(this.regionConfigurers);
229229
serverRegionFactory.setRegionName(regionName);
230230
serverRegionFactory.setShortcut(getServerRegionShortcut());
231+
serverRegionFactory.setStatisticsEnabled(getStatisticsEnabled());
231232
serverRegionFactory.setValueConstraint(getValueConstraint());
232233

233234
configureEviction(serverRegionFactory);
@@ -502,6 +503,14 @@ protected Optional<SmartLifecycle> getSmartLifecycleComponent() {
502503
return Optional.ofNullable(this.smartLifecycleComponent);
503504
}
504505

506+
public void setStatisticsEnabled(Boolean statisticsEnabled) {
507+
this.statisticsEnabled = statisticsEnabled;
508+
}
509+
510+
public Boolean getStatisticsEnabled() {
511+
return statisticsEnabled;
512+
}
513+
505514
public void setValueConstraint(Class<V> valueConstraint) {
506515
this.valueConstraint = valueConstraint;
507516
}

0 commit comments

Comments
 (0)