Declare getter and setter for statisticsEnabled.
Set statisticsEnabled property for client and peer (server) Regions. Resolves gh-518.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.springframework.data.gemfire.config.annotation.support;
|
||||
|
||||
import static org.springframework.data.gemfire.util.ArrayUtils.nullSafeArray;
|
||||
@@ -171,6 +170,7 @@ public class CacheTypeAwareRegionFactoryBean<K, V> extends ResolvableRegionFacto
|
||||
clientRegionFactory.setRegionConfigurers(this.regionConfigurers);
|
||||
clientRegionFactory.setRegionName(regionName);
|
||||
clientRegionFactory.setShortcut(getClientRegionShortcut());
|
||||
clientRegionFactory.setStatisticsEnabled(getStatisticsEnabled());
|
||||
clientRegionFactory.setValueConstraint(getValueConstraint());
|
||||
|
||||
getPoolName().ifPresent(clientRegionFactory::setPoolName);
|
||||
@@ -228,6 +228,7 @@ public class CacheTypeAwareRegionFactoryBean<K, V> extends ResolvableRegionFacto
|
||||
serverRegionFactory.setRegionConfigurers(this.regionConfigurers);
|
||||
serverRegionFactory.setRegionName(regionName);
|
||||
serverRegionFactory.setShortcut(getServerRegionShortcut());
|
||||
serverRegionFactory.setStatisticsEnabled(getStatisticsEnabled());
|
||||
serverRegionFactory.setValueConstraint(getValueConstraint());
|
||||
|
||||
configureEviction(serverRegionFactory);
|
||||
@@ -502,6 +503,14 @@ public class CacheTypeAwareRegionFactoryBean<K, V> extends ResolvableRegionFacto
|
||||
return Optional.ofNullable(this.smartLifecycleComponent);
|
||||
}
|
||||
|
||||
public void setStatisticsEnabled(Boolean statisticsEnabled) {
|
||||
this.statisticsEnabled = statisticsEnabled;
|
||||
}
|
||||
|
||||
public Boolean getStatisticsEnabled() {
|
||||
return statisticsEnabled;
|
||||
}
|
||||
|
||||
public void setValueConstraint(Class<V> valueConstraint) {
|
||||
this.valueConstraint = valueConstraint;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user