Class DefaultCacheRegionProvider
- java.lang.Object
-
- de.hybris.platform.regioncache.region.impl.DefaultCacheRegionProvider
-
- All Implemented Interfaces:
CacheRegionProvider
public class DefaultCacheRegionProvider extends java.lang.Object implements CacheRegionProvider
Class keeps region lists and provides region list access methods.
BeanName=defaultCacheRegionProvider, alias=cacheRegionProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<CacheRegion>allRegionsInternal dataprotected CacheRegionallTypeRegionprotected java.util.Map<java.lang.String,CacheRegion>manualRegionsprotected java.util.List<CacheRegion>queryTypeRegionsprotected java.util.Map<java.lang.String,java.util.List<CacheRegion>>regionsSingletonCollectionsprotected java.util.Map<java.lang.String,java.util.List<CacheRegion>>regionsTypesprotected java.util.List<CacheRegion>regularRegions
-
Constructor Summary
Constructors Constructor Description DefaultCacheRegionProvider(CacheRegionsHolder cacheRegionsHolder)DefaultCacheRegionProvider(java.util.Collection<CacheRegion> cacheRegions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<CacheRegion>createDefaultRegion()Creates default regions.java.util.List<CacheRegion>getAllRegions()Returns immutable collections of ALL regions (manual and regular)CacheRegiongetManualRegion(java.lang.String name)Returns manual region of name given or NULL.java.util.Collection<CacheRegion>getManualRegions()Returns all manual regions.java.util.List<CacheRegion>getQueryRegions()returns regions handling __QUERY_CACHE__java.util.List<CacheRegion>getRegionByName(java.lang.String name)returns singleton collection for region of name given.CacheRegiongetRegionForAllTypes()Gets collection of regions able to handle all types.
It is necessary to resolve specific type first.java.util.List<CacheRegion>getRegions()Returns all non-manual regions.java.util.List<CacheRegion>getRegionsForType(java.lang.Object typeCode)returns collection of regions handling type given.voidinit()protected booleanisManualRegion(CacheRegion region)voidsetRegionRegistryAllocationStrategy(RegionRegistryAllocationStrategy regionRegistryAllocationStrategy)Spring initialization
-
-
-
Field Detail
-
allRegions
protected java.util.List<CacheRegion> allRegions
Internal data
-
manualRegions
protected java.util.Map<java.lang.String,CacheRegion> manualRegions
-
regularRegions
protected java.util.List<CacheRegion> regularRegions
-
allTypeRegion
protected CacheRegion allTypeRegion
-
queryTypeRegions
protected java.util.List<CacheRegion> queryTypeRegions
-
regionsTypes
protected java.util.Map<java.lang.String,java.util.List<CacheRegion>> regionsTypes
-
regionsSingletonCollections
protected java.util.Map<java.lang.String,java.util.List<CacheRegion>> regionsSingletonCollections
-
-
Constructor Detail
-
DefaultCacheRegionProvider
public DefaultCacheRegionProvider(CacheRegionsHolder cacheRegionsHolder)
-
DefaultCacheRegionProvider
public DefaultCacheRegionProvider(java.util.Collection<CacheRegion> cacheRegions)
-
-
Method Detail
-
createDefaultRegion
protected java.util.Collection<CacheRegion> createDefaultRegion()
Creates default regions. Subclasses can override defaults defined here.
-
init
@PostConstruct public void init()
-
getAllRegions
public java.util.List<CacheRegion> getAllRegions()
Returns immutable collections of ALL regions (manual and regular)- Specified by:
getAllRegionsin interfaceCacheRegionProvider
-
getRegions
public java.util.List<CacheRegion> getRegions()
Returns all non-manual regions.- Specified by:
getRegionsin interfaceCacheRegionProvider
-
getRegionsForType
public java.util.List<CacheRegion> getRegionsForType(java.lang.Object typeCode)
returns collection of regions handling type given.
Map- Specified by:
getRegionsForTypein interfaceCacheRegionProvider
-
getRegionForAllTypes
public CacheRegion getRegionForAllTypes()
Gets collection of regions able to handle all types.
It is necessary to resolve specific type first. If it cannot be done all-type-region shall be used.- Specified by:
getRegionForAllTypesin interfaceCacheRegionProvider
-
getRegionByName
public java.util.List<CacheRegion> getRegionByName(java.lang.String name)
returns singleton collection for region of name given.- Specified by:
getRegionByNamein interfaceCacheRegionProvider
-
getQueryRegions
public java.util.List<CacheRegion> getQueryRegions()
returns regions handling __QUERY_CACHE__- Specified by:
getQueryRegionsin interfaceCacheRegionProvider
-
getManualRegion
public CacheRegion getManualRegion(java.lang.String name)
Returns manual region of name given or NULL.- Specified by:
getManualRegionin interfaceCacheRegionProvider
-
getManualRegions
public java.util.Collection<CacheRegion> getManualRegions()
Returns all manual regions.- Specified by:
getManualRegionsin interfaceCacheRegionProvider
-
isManualRegion
protected boolean isManualRegion(CacheRegion region)
-
setRegionRegistryAllocationStrategy
public void setRegionRegistryAllocationStrategy(RegionRegistryAllocationStrategy regionRegistryAllocationStrategy)
Spring initialization
-
-