Spring Data for VMware GemFire
Interface PoolResolver
- All Known Implementing Classes:
BeanFactoryPoolResolver,ClientCacheDefaultPoolResolver,ComposablePoolResolver,PoolManagerPoolResolver,SinglePoolPoolResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
PoolResolver is a strategy interface for resolving references to Apache Geode Pool instances.
This is used throughout SDG's codebase to separate SDG's Pool resolution logic from being explicitly tied to
to Apache Geode's static PoolManager class. This interfaces also serves
as an SPI for different strategies when resolving a Pool.- Since:
- 2.3.0
- See Also:
-
FunctionalInterfaceRegionPool
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault org.apache.geode.cache.client.PoolRequires aPoolobject with the givennameto exist.org.apache.geode.cache.client.PoolResolves aPoolwith the givenname.default org.apache.geode.cache.client.Poolresolve(org.apache.geode.cache.client.ClientCache clientCache) Resolves the DEFAULTPoolfrom the givenClientCacheinstance.default org.apache.geode.cache.client.Poolresolve(org.apache.geode.cache.Region<?, ?> region) Resolves thePoolinstance used by the givenRegion.
-
Field Details
-
DEFAULT_POOL_NAME
- See Also:
-
-
Method Details
-
resolve
@Nullable default org.apache.geode.cache.client.Pool resolve(@Nullable org.apache.geode.cache.client.ClientCache clientCache) Resolves the DEFAULTPoolfrom the givenClientCacheinstance.- Parameters:
clientCache-ClientCacheinstance from which to resolve the DEFAULTPool.- Returns:
- the configured DEFAULT
Poolfrom the givenClientCacheinstance. - See Also:
-
ClientCache.getDefaultPool()ClientCachePool
-
resolve
@Nullable default org.apache.geode.cache.client.Pool resolve(@Nullable org.apache.geode.cache.Region<?, ?> region) Resolves thePoolinstance used by the givenRegion. If theRegionis a clientRegionbut does not explicitly configure a specificPoolreference, then the DEFAULTPoolis returned. If theRegionis local or a peerRegion, then null is returned.- Parameters:
region-Regionfrom which to resolve the associatedPool.- Returns:
- the
Poolinstance associated with the givenRegion, or the DEFAULTPoolif theRegionis a clientRegion, or null if theRegionis not a clientRegion. - See Also:
-
RegionPool
-
resolve
Resolves aPoolwith the givenname. -
require
Requires aPoolobject with the givennameto exist.- Parameters:
poolName-nameof the requiredPoolto resolve.- Returns:
- the required
Poolwith the givennameor throw anIllegalStateExceptionif aPoolwithnamedoes not exist! - Throws:
IllegalStateException- if aPoolwith the givennamedoes not exist.- See Also:
-
Poolresolve(String)
-