Class SinglePoolPoolResolver
java.lang.Object
org.springframework.data.gemfire.client.support.SinglePoolPoolResolver
- All Implemented Interfaces:
PoolResolver
PoolResolver
implementation that resolves a single, configured Pool
.- Since:
- 2.3.0
- See Also:
-
Pool
PoolResolver
-
Field Summary
Fields inherited from interface org.springframework.data.gemfire.client.PoolResolver
DEFAULT_POOL_NAME
-
Constructor Summary
ConstructorDescriptionSinglePoolPoolResolver
(org.apache.geode.cache.client.Pool pool) Constructs an instance ofSinglePoolPoolResolver
initialized with the givenPool
returned during resolution. -
Method Summary
Modifier and TypeMethodDescriptionstatic SinglePoolPoolResolver
from
(org.apache.geode.cache.client.ClientCache clientCache) Factory method used to construct a new instance ofSinglePoolPoolResolver
from an instance ofClientCache
using theClientCache.getDefaultPool()
DEFAULT}Pool
.protected org.apache.geode.cache.client.Pool
getPool()
Returns a reference to the configured, "resolvable"Pool
.org.apache.geode.cache.client.Pool
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.gemfire.client.PoolResolver
require, resolve, resolve
-
Constructor Details
-
SinglePoolPoolResolver
public SinglePoolPoolResolver(@NonNull org.apache.geode.cache.client.Pool pool) Constructs an instance ofSinglePoolPoolResolver
initialized with the givenPool
returned during resolution.- Parameters:
pool
-Pool
object resolved by thisPoolResolver
.- Throws:
IllegalArgumentException
- ifPool
is null.- See Also:
-
Pool
-
-
Method Details
-
from
public static SinglePoolPoolResolver from(@NonNull org.apache.geode.cache.client.ClientCache clientCache) Factory method used to construct a new instance ofSinglePoolPoolResolver
from an instance ofClientCache
using theClientCache.getDefaultPool()
DEFAULT}Pool
.- Parameters:
clientCache
-ClientCache
instance used to resolve theDEFAULT
Pool
.- Returns:
- a new
SinglePoolPoolResolver
initialized with the DEFAULTPool
. - Throws:
IllegalArgumentException
- if theClientCache
or theClientCache.getDefaultPool()
DEFAULT}Pool
is null.- See Also:
-
ClientCache
ClientCache.getDefaultPool()
-
getPool
@NonNull protected org.apache.geode.cache.client.Pool getPool()Returns a reference to the configured, "resolvable"Pool
.- Returns:
- a reference to the configured, "resolvable"
Pool
. - See Also:
-
Pool
-
resolve
- Specified by:
resolve
in interfacePoolResolver
- Parameters:
poolName
-name
of thePool
to resolve.- Returns:
- the configured
Pool
if the configuredPool
name
and the givenpoolName
match. - See Also:
-
Pool.getName()
-