|
14 | 14 | * limitations under the License.
|
15 | 15 | *
|
16 | 16 | */
|
17 |
| - |
18 | 17 | package org.springframework.data.gemfire.config.annotation.support;
|
19 | 18 |
|
20 | 19 | import static org.springframework.data.gemfire.util.ArrayUtils.nullSafeArray;
|
@@ -171,6 +170,7 @@ protected Region<K, V> newClientRegion(GemFireCache gemfireCache, String regionN
|
171 | 170 | clientRegionFactory.setRegionConfigurers(this.regionConfigurers);
|
172 | 171 | clientRegionFactory.setRegionName(regionName);
|
173 | 172 | clientRegionFactory.setShortcut(getClientRegionShortcut());
|
| 173 | + clientRegionFactory.setStatisticsEnabled(getStatisticsEnabled()); |
174 | 174 | clientRegionFactory.setValueConstraint(getValueConstraint());
|
175 | 175 |
|
176 | 176 | getPoolName().ifPresent(clientRegionFactory::setPoolName);
|
@@ -228,6 +228,7 @@ protected Region<K, V> newServerRegion(GemFireCache gemfireCache, String regionN
|
228 | 228 | serverRegionFactory.setRegionConfigurers(this.regionConfigurers);
|
229 | 229 | serverRegionFactory.setRegionName(regionName);
|
230 | 230 | serverRegionFactory.setShortcut(getServerRegionShortcut());
|
| 231 | + serverRegionFactory.setStatisticsEnabled(getStatisticsEnabled()); |
231 | 232 | serverRegionFactory.setValueConstraint(getValueConstraint());
|
232 | 233 |
|
233 | 234 | configureEviction(serverRegionFactory);
|
@@ -502,6 +503,14 @@ protected Optional<SmartLifecycle> getSmartLifecycleComponent() {
|
502 | 503 | return Optional.ofNullable(this.smartLifecycleComponent);
|
503 | 504 | }
|
504 | 505 |
|
| 506 | + public void setStatisticsEnabled(Boolean statisticsEnabled) { |
| 507 | + this.statisticsEnabled = statisticsEnabled; |
| 508 | + } |
| 509 | + |
| 510 | + public Boolean getStatisticsEnabled() { |
| 511 | + return statisticsEnabled; |
| 512 | + } |
| 513 | + |
505 | 514 | public void setValueConstraint(Class<V> valueConstraint) {
|
506 | 515 | this.valueConstraint = valueConstraint;
|
507 | 516 | }
|
|
0 commit comments