Class SpaceProxyPool

java.lang.Object
com.gigaspaces.proxy_pool.SpaceProxyPool

public class SpaceProxyPool extends Object
Since:
16.0.
Author:
Meshi Ruff
  • Constructor Details

    • SpaceProxyPool

      public SpaceProxyPool(SpaceProxyPoolFactory spaceProxyPoolFactory)
    • SpaceProxyPool

      public SpaceProxyPool(int capacity, long expirationTime, long waitingTimeout, SpaceProxyPoolFactory spaceProxyPoolFactory)
      Constructor for tests.
  • Method Details

    • getOrCreate

      Get connection for specific sessionId. If sessionId does not exist, create new connection
      Parameters:
      ijSpace -
      sessionId -
      props -
      Returns:
      gConnection
      Throws:
      SQLException
      TimeoutException - if timeout reached while waiting for connection
      SpaceProxyPoolException - if the session expired while getting the connection
      InterruptedException
    • putBack

      public void putBack(GConnection gConnection, String sessionId, String spaceName) throws SpaceProxyPoolException
      Put back the connection after usage
      Parameters:
      gConnection -
      sessionId -
      spaceName -
      Throws:
      SpaceProxyPoolException - if the session expired while getting the connection
    • evict

      public void evict() throws SQLException
      Evict the connections which pass the expiration time. Runs periodically
      Throws:
      SQLException
    • deleteLoggedOutSession

      public void deleteLoggedOutSession(String sessionId)
      When a session is logged out, remove all connections of this session
      Parameters:
      sessionId -
    • clearConnectionPool

      public void clearConnectionPool()
      Clear all connections from pool in case of openid IdP settings or roles in security service changed
    • getExpirationTime

      public long getExpirationTime()
    • getProxyCounter

      public int getProxyCounter()
    • isSessionIdExists

      public boolean isSessionIdExists(String sessionId)
    • getHashMapSize

      public int getHashMapSize()