Enable statistics for caching-defined Regions.

Resolves gh-518.
This commit is contained in:
John Blum
2021-07-14 14:43:07 -07:00
parent 5c199d2fbb
commit 6145bdb077
2 changed files with 4 additions and 3 deletions

View File

@@ -117,10 +117,10 @@ public class CachingDefinedRegionsConfiguration extends AbstractAnnotationConfig
private ClientRegionShortcut clientRegionShortcut = ClientRegionShortcut.PROXY;
private CompositeLifecycle compositeLifecycle = new CompositeLifecycle();
private final CompositeLifecycle compositeLifecycle = new CompositeLifecycle();
@Autowired(required = false)
private List<RegionConfigurer> regionConfigurers = Collections.emptyList();
private final List<RegionConfigurer> regionConfigurers = Collections.emptyList();
private RegionShortcut serverRegionShortcut = RegionShortcut.PARTITION;
@@ -314,6 +314,7 @@ public class CachingDefinedRegionsConfiguration extends AbstractAnnotationConfig
regionFactoryBean.setRegionConfigurers(resolveRegionConfigurers());
regionFactoryBean.setRegionName(cacheName);
regionFactoryBean.setServerRegionShortcut(resolveServerRegionShortcut());
regionFactoryBean.setStatisticsEnabled(true);
String poolName = resolvePoolName();
@@ -391,6 +392,7 @@ public class CachingDefinedRegionsConfiguration extends AbstractAnnotationConfig
protected abstract Class<? extends Annotation>[] getMethodCacheAnnotationTypes();
@SuppressWarnings("rawtypes")
protected Class[] append(Class[] annotationTypes, Class... additionalAnnotationTypes) {
List<Class> annotationTypeList = new ArrayList<>(Arrays.asList(annotationTypes));

View File

@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.gemfire.config.annotation;
import java.lang.annotation.Documented;