Class SinglePoolPoolResolver

java.lang.Object
org.springframework.data.gemfire.client.support.SinglePoolPoolResolver
All Implemented Interfaces:
PoolResolver

public class SinglePoolPoolResolver extends Object implements PoolResolver
PoolResolver implementation that resolves a single, configured Pool.
Since:
2.3.0
See Also:
  • Constructor Details

    • SinglePoolPoolResolver

      public SinglePoolPoolResolver(@NonNull org.apache.geode.cache.client.Pool pool)
      Constructs an instance of SinglePoolPoolResolver initialized with the given Pool returned during resolution.
      Parameters:
      pool - Pool object resolved by this PoolResolver.
      Throws:
      IllegalArgumentException - if Pool 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 of SinglePoolPoolResolver from an instance of ClientCache using the ClientCache.getDefaultPool() DEFAULT} Pool.
      Parameters:
      clientCache - ClientCache instance used to resolve the DEFAULT Pool.
      Returns:
      a new SinglePoolPoolResolver initialized with the DEFAULT Pool.
      Throws:
      IllegalArgumentException - if the ClientCache or the ClientCache.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

      @Nullable public org.apache.geode.cache.client.Pool resolve(@Nullable String poolName)
      Returns the configured Pool iff the given poolName matches the configured Pool name.
      Specified by:
      resolve in interface PoolResolver
      Parameters:
      poolName - name of the Pool to resolve.
      Returns:
      the configured Pool if the configured Pool name and the given poolName match.
      See Also:
      • Pool.getName()