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
Nested ClassesModifier and TypeClassDescriptionprotected static interface -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance ofRegionServiceRegionResolverinitialized with the givenRegionServiceRegionResolver.RegionServiceResolver. -
Method Summary
Modifier and TypeMethodDescriptionprotected <K,V> Region<K, V> Resolves a cacheRegionidentified by the givennameusing the configuredRegionServiceresolved from theRegionServiceRegionResolver.RegionServiceResolver.from(RegionService regionService) Factory method used to construct aRegionServiceRegionResolverinitialized with the givenRegionService.static <S extends GemFireCache>
RegionServiceRegionResolver<S>from(CacheResolver<S> cacheResolver) Factory method used to construct aRegionServiceRegionResolverfrom aCacheResolver.Returns the configuredRegionServiceRegionResolver.RegionServiceResolverused to resolve theRegionServicethat is then used to resolve cacheRegionsbyname.Methods inherited from class org.springframework.data.gemfire.support.AbstractCachingRegionResolver
afterRegionDestroy, resolveMethods inherited from class org.apache.geode.cache.util.CacheListenerAdapter
afterCreate, afterDestroy, afterInvalidate, afterRegionClear, afterRegionCreate, afterRegionInvalidate, afterRegionLive, afterUpdate, closeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.geode.cache.Declarable
init, initializeMethods inherited from interface org.springframework.data.gemfire.RegionResolver
require
-
Constructor Details
-
RegionServiceRegionResolver
Constructs a new instance ofRegionServiceRegionResolverinitialized with the givenRegionServiceRegionResolver.RegionServiceResolver.- Parameters:
resolver-RegionServiceRegionResolver.RegionServiceResolverused to resolve theRegionServicethat is used to resolve cacheRegionsbyname.- Throws:
IllegalArgumentException- ifRegionServiceRegionResolver.RegionServiceResolveris null.- See Also:
-
-
Method Details
-
from
@NonNull public static <S extends GemFireCache> RegionServiceRegionResolver<S> from(@NonNull CacheResolver<S> cacheResolver) Factory method used to construct aRegionServiceRegionResolverfrom aCacheResolver. TheCacheResolverwill resolve an instance ofGemFireCache, such as a peerCacheor aClientCache, which is aRegionServicecapable of resolving aRegionidentified byname.- Type Parameters:
S-subclassofGemFireCache.- Parameters:
cacheResolver-CacheResolverused to resolve theRegionService.- Returns:
- a new instance of
RegionServiceRegionResolver. - Throws:
IllegalArgumentException- ifCacheResolveris null.- See Also:
-
from
@NonNull public static RegionServiceRegionResolver<RegionService> from(@Nullable RegionService regionService) Factory method used to construct aRegionServiceRegionResolverinitialized with the givenRegionService. TheRegionServicemay be an instance ofGemFireCache, such as a peerCacheorClientCache.- Parameters:
regionService-RegionServiceused to resolve cacheRegionsidentified byname; may be null.- Returns:
- a new instance of
RegionServiceRegionResolver. - See Also:
-
getRegionServiceResolver
Returns the configuredRegionServiceRegionResolver.RegionServiceResolverused to resolve theRegionServicethat is then used to resolve cacheRegionsbyname.- Returns:
- the configured
RegionServiceRegionResolver.RegionServiceResolver. - See Also:
-
doResolve
Resolves a cacheRegionidentified by the givennameusing the configuredRegionServiceresolved from theRegionServiceRegionResolver.RegionServiceResolver.
-