Class RegionServiceRegionResolver<T extends org.apache.geode.cache.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:
org.apache.geode.cache.CacheCallback
,org.apache.geode.cache.CacheListener
,org.apache.geode.cache.Declarable
,RegionResolver
public class RegionServiceRegionResolver<T extends org.apache.geode.cache.RegionService>
extends AbstractCachingRegionResolver
RegionResolver
implementation used to resolve a cache Region
identified by name
using the configured RegionService
.- Since:
- 2.3.0
- See Also:
-
Cache
GemFireCache
Region
RegionService
ClientCache
CacheResolver
RegionResolver
AbstractCachingRegionResolver
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
RegionServiceRegionResolver.RegionServiceResolver<T extends org.apache.geode.cache.RegionService>
-
Constructor Summary
ConstructorDescriptionConstructs a new instance ofRegionServiceRegionResolver
initialized with the givenRegionServiceRegionResolver.RegionServiceResolver
. -
Method Summary
Modifier and TypeMethodDescriptionprotected <K,
V> org.apache.geode.cache.Region<K, V> Resolves a cacheRegion
identified by the givenname
using the configuredRegionService
resolved from theRegionServiceRegionResolver.RegionServiceResolver
.static RegionServiceRegionResolver<org.apache.geode.cache.RegionService>
from
(org.apache.geode.cache.RegionService regionService) Factory method used to construct aRegionServiceRegionResolver
initialized with the givenRegionService
.static <S extends org.apache.geode.cache.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 org.apache.geode.cache.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<org.apache.geode.cache.RegionService> from(@Nullable org.apache.geode.cache.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:
-
RegionServiceRegionResolver(RegionServiceResolver)
RegionService
-
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
@Nullable protected <K,V> org.apache.geode.cache.Region<K,V> doResolve(@Nullable String regionName) Resolves a cacheRegion
identified by the givenname
using the configuredRegionService
resolved from theRegionServiceRegionResolver.RegionServiceResolver
.- Specified by:
doResolve
in classAbstractCachingRegionResolver
- Type Parameters:
K
-type
of theRegion
key.V
-type
of theRegion
value.- Parameters:
regionName
-name
of theRegion
to resolve.- Returns:
- the resolved cache
Region
identified by the givenname
; may be null. - See Also:
-
RegionService.getRegion(String)
getRegionServiceResolver()
-