Class RegionServiceRegionResolver<T extends RegionService>
java.lang.Object
org.apache.geode.cache.util.CacheListenerAdapter
org.springframework.data.gemfire.support.AbstractCachingRegionResolver
org.springframework.data.gemfire.support.RegionServiceRegionResolver<T>
- All Implemented Interfaces:
CacheCallback
,CacheListener
,Declarable
,RegionResolver
public class RegionServiceRegionResolver<T extends RegionService>
extends AbstractCachingRegionResolver
RegionResolver
implementation used to resolve a cache Region
identified by name
using the configured RegionService
.- Since:
- 2.3.0
- Author:
- John Blum
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
-
Constructor Summary
ConstructorDescriptionConstructs a new instance ofRegionServiceRegionResolver
initialized with the givenRegionServiceRegionResolver.RegionServiceResolver
. -
Method Summary
Modifier and TypeMethodDescriptionprotected <K,
V> Region<K, V> Resolves a cacheRegion
identified by the givenname
using the configuredRegionService
resolved from theRegionServiceRegionResolver.RegionServiceResolver
.from
(RegionService regionService) Factory method used to construct aRegionServiceRegionResolver
initialized with the givenRegionService
.static <S extends GemFireCache>
RegionServiceRegionResolver<S>from
(CacheResolver<S> cacheResolver) Factory method used to construct aRegionServiceRegionResolver
from aCacheResolver
.Returns the configuredRegionServiceRegionResolver.RegionServiceResolver
used to resolve theRegionService
that is then used to resolve cacheRegions
byname
.Methods inherited from class org.springframework.data.gemfire.support.AbstractCachingRegionResolver
afterRegionDestroy, resolve
Methods inherited from class org.apache.geode.cache.util.CacheListenerAdapter
afterCreate, afterDestroy, afterInvalidate, afterRegionClear, afterRegionCreate, afterRegionInvalidate, afterRegionLive, afterUpdate, close
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.geode.cache.Declarable
init, initialize
Methods inherited from interface org.springframework.data.gemfire.RegionResolver
require
-
Constructor Details
-
RegionServiceRegionResolver
Constructs a new instance ofRegionServiceRegionResolver
initialized with the givenRegionServiceRegionResolver.RegionServiceResolver
.- Parameters:
resolver
-RegionServiceRegionResolver.RegionServiceResolver
used to resolve theRegionService
that is used to resolve cacheRegions
byname
.- Throws:
IllegalArgumentException
- ifRegionServiceRegionResolver.RegionServiceResolver
is null.- See Also:
-
-
Method Details
-
from
@NonNull public static <S extends GemFireCache> RegionServiceRegionResolver<S> from(@NonNull CacheResolver<S> cacheResolver) Factory method used to construct aRegionServiceRegionResolver
from aCacheResolver
. TheCacheResolver
will resolve an instance ofGemFireCache
, such as a peerCache
or aClientCache
, which is aRegionService
capable of resolving aRegion
identified byname
.- Type Parameters:
S
-subclass
ofGemFireCache
.- Parameters:
cacheResolver
-CacheResolver
used to resolve theRegionService
.- Returns:
- a new instance of
RegionServiceRegionResolver
. - Throws:
IllegalArgumentException
- ifCacheResolver
is null.- See Also:
-
from
@NonNull public static RegionServiceRegionResolver<RegionService> from(@Nullable RegionService regionService) Factory method used to construct aRegionServiceRegionResolver
initialized with the givenRegionService
. TheRegionService
may be an instance ofGemFireCache
, such as a peerCache
orClientCache
.- Parameters:
regionService
-RegionService
used to resolve cacheRegions
identified byname
; may be null.- Returns:
- a new instance of
RegionServiceRegionResolver
. - See Also:
-
getRegionServiceResolver
Returns the configuredRegionServiceRegionResolver.RegionServiceResolver
used to resolve theRegionService
that is then used to resolve cacheRegions
byname
.- Returns:
- the configured
RegionServiceRegionResolver.RegionServiceResolver
. - See Also:
-
doResolve
Resolves a cacheRegion
identified by the givenname
using the configuredRegionService
resolved from theRegionServiceRegionResolver.RegionServiceResolver
.
-