@FunctionalInterface public interface PoolResolver
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.FunctionalInterface,
Region,
Pool| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_POOL_NAME |
| Modifier and Type | Method and Description |
|---|---|
default org.apache.geode.cache.client.Pool |
require(String poolName)
Requires a
Pool object with the given name to exist. |
default org.apache.geode.cache.client.Pool |
resolve(org.apache.geode.cache.client.ClientCache clientCache)
Resolves the DEFAULT
Pool from the given ClientCache instance. |
default org.apache.geode.cache.client.Pool |
resolve(org.apache.geode.cache.Region<?,?> region)
Resolves the
Pool instance used by the given Region. |
org.apache.geode.cache.client.Pool |
resolve(String poolName)
Resolves a
Pool with the given name. |
static final String DEFAULT_POOL_NAME
@Nullable default org.apache.geode.cache.client.Pool resolve(@Nullable org.apache.geode.cache.client.ClientCache clientCache)
Pool from the given ClientCache instance.clientCache - ClientCache instance from which to resolve the DEFAULT Pool.Pool from the given ClientCache instance.ClientCache.getDefaultPool(),
ClientCache,
Pool@Nullable default org.apache.geode.cache.client.Pool resolve(@Nullable org.apache.geode.cache.Region<?,?> region)
Pool instance used by the given Region.
If the Region is a client Region but does not explicitly configure
a specific Pool reference, then the DEFAULT Pool is returned.
If the Region is local or a peer Region, then null
is returned.region - Region from which to resolve the associated Pool.Pool instance associated with the given Region,
or the DEFAULT Pool if the Region is a client Region,
or null if the Region is not a client Region.Region,
Pool@Nullable org.apache.geode.cache.client.Pool resolve(@Nullable String poolName)
Pool with the given name.@NonNull default org.apache.geode.cache.client.Pool require(@NonNull String poolName)
Pool object with the given name to exist.poolName - name of the required Pool to resolve.Pool with the given name or throw an IllegalStateException
if a Pool with name does not exist!IllegalStateException - if a Pool with the given name does not exist.Pool,
resolve(String)Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.