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:
-
FunctionalInterface
Region
Pool
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault org.apache.geode.cache.client.Pool
Requires aPool
object with the givenname
to exist.org.apache.geode.cache.client.Pool
Resolves aPool
with the givenname
.default org.apache.geode.cache.client.Pool
resolve
(org.apache.geode.cache.client.ClientCache clientCache) Resolves the DEFAULTPool
from the givenClientCache
instance.default org.apache.geode.cache.client.Pool
resolve
(org.apache.geode.cache.Region<?, ?> region) Resolves thePool
instance 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 DEFAULTPool
from the givenClientCache
instance.- Parameters:
clientCache
-ClientCache
instance from which to resolve the DEFAULTPool
.- Returns:
- the configured DEFAULT
Pool
from the givenClientCache
instance. - See Also:
-
ClientCache.getDefaultPool()
ClientCache
Pool
-
resolve
@Nullable default org.apache.geode.cache.client.Pool resolve(@Nullable org.apache.geode.cache.Region<?, ?> region) Resolves thePool
instance used by the givenRegion
. If theRegion
is a clientRegion
but does not explicitly configure a specificPool
reference, then the DEFAULTPool
is returned. If theRegion
is local or a peerRegion
, then null is returned.- Parameters:
region
-Region
from which to resolve the associatedPool
.- Returns:
- the
Pool
instance associated with the givenRegion
, or the DEFAULTPool
if theRegion
is a clientRegion
, or null if theRegion
is not a clientRegion
. - See Also:
-
Region
Pool
-
resolve
Resolves aPool
with the givenname
. -
require
Requires aPool
object with the givenname
to exist.- Parameters:
poolName
-name
of the requiredPool
to resolve.- Returns:
- the required
Pool
with the givenname
or throw anIllegalStateException
if aPool
withname
does not exist! - Throws:
IllegalStateException
- if aPool
with the givenname
does not exist.- See Also:
-
Pool
resolve(String)
-