Spring Data for VMware GemFire
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:
-
PoolPoolResolver
-
Field Summary
Fields inherited from interface org.springframework.data.gemfire.client.PoolResolver
DEFAULT_POOL_NAME -
Constructor Summary
ConstructorsConstructorDescriptionSinglePoolPoolResolver(org.apache.geode.cache.client.Pool pool) Constructs an instance ofSinglePoolPoolResolverinitialized with the givenPoolreturned during resolution. -
Method Summary
Modifier and TypeMethodDescriptionstatic SinglePoolPoolResolverfrom(org.apache.geode.cache.client.ClientCache clientCache) Factory method used to construct a new instance ofSinglePoolPoolResolverfrom an instance ofClientCacheusing theClientCache.getDefaultPool()DEFAULT}Pool.protected org.apache.geode.cache.client.PoolgetPool()Returns a reference to the configured, "resolvable"Pool.org.apache.geode.cache.client.PoolMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 ofSinglePoolPoolResolverinitialized with the givenPoolreturned during resolution.- Parameters:
pool-Poolobject resolved by thisPoolResolver.- Throws:
IllegalArgumentException- ifPoolis 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 ofSinglePoolPoolResolverfrom an instance ofClientCacheusing theClientCache.getDefaultPool()DEFAULT}Pool.- Parameters:
clientCache-ClientCacheinstance used to resolve theDEFAULTPool.- Returns:
- a new
SinglePoolPoolResolverinitialized with the DEFAULTPool. - Throws:
IllegalArgumentException- if theClientCacheor theClientCache.getDefaultPool()DEFAULT}Poolis null.- See Also:
-
ClientCacheClientCache.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:
resolvein interfacePoolResolver- Parameters:
poolName-nameof thePoolto resolve.- Returns:
- the configured
Poolif the configuredPoolnameand the givenpoolNamematch. - See Also:
-
Pool.getName()
-