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.

@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.
Since:
2.3.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.apache.geode.cache.client.Pool
    require(String poolName)
    Requires a Pool object with the given name to exist.
    org.apache.geode.cache.client.Pool
    resolve(String poolName)
    Resolves a Pool with the given name.
    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.
  • Field Details

  • Method Details

    • resolve

      @Nullable default org.apache.geode.cache.client.Pool resolve(@Nullable org.apache.geode.cache.client.ClientCache clientCache)
      Resolves the DEFAULT Pool from the given ClientCache instance.
      Parameters:
      clientCache - ClientCache instance from which to resolve the DEFAULT Pool.
      Returns:
      the configured DEFAULT Pool from the given ClientCache 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 the 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.
      Parameters:
      region - Region from which to resolve the associated Pool.
      Returns:
      the 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.
      See Also:
      • Region
      • Pool
    • resolve

      @Nullable org.apache.geode.cache.client.Pool resolve(@Nullable String poolName)
      Resolves a Pool with the given name.
      Parameters:
      poolName - name of the Pool to resolve.
      Returns:
      the Pool with the given name or {@link null} if no Pool exists with the name.
      See Also:
      • Pool
    • require

      @NonNull default org.apache.geode.cache.client.Pool require(@NonNull String poolName)
      Requires a Pool object with the given name to exist.
      Parameters:
      poolName - name of the required Pool to resolve.
      Returns:
      the required Pool with the given name or throw an IllegalStateException if a Pool with name does not exist!
      Throws:
      IllegalStateException - if a Pool with the given name does not exist.
      See Also: