Skip to content

Commit

Permalink
Declare getter and setter for statisticsEnabled.
Browse files Browse the repository at this point in the history
Set statisticsEnabled property for client and peer (server) Regions.

Resolves spring-projectsgh-518.
  • Loading branch information
jxblum committed Jul 14, 2021
1 parent 288b851 commit 5c199d2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -171,6 +170,7 @@ protected Region<K, V> newClientRegion(GemFireCache gemfireCache, String regionN
clientRegionFactory.setRegionConfigurers(this.regionConfigurers);
clientRegionFactory.setRegionName(regionName);
clientRegionFactory.setShortcut(getClientRegionShortcut());
clientRegionFactory.setStatisticsEnabled(getStatisticsEnabled());
clientRegionFactory.setValueConstraint(getValueConstraint());

getPoolName().ifPresent(clientRegionFactory::setPoolName);
Expand Down Expand Up @@ -228,6 +228,7 @@ protected Region<K, V> newServerRegion(GemFireCache gemfireCache, String regionN
serverRegionFactory.setRegionConfigurers(this.regionConfigurers);
serverRegionFactory.setRegionName(regionName);
serverRegionFactory.setShortcut(getServerRegionShortcut());
serverRegionFactory.setStatisticsEnabled(getStatisticsEnabled());
serverRegionFactory.setValueConstraint(getValueConstraint());

configureEviction(serverRegionFactory);
Expand Down Expand Up @@ -502,6 +503,14 @@ protected Optional<SmartLifecycle> getSmartLifecycleComponent() {
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;
}
Expand Down

0 comments on commit 5c199d2

Please # to comment.