Class ConnectionPool

java.lang.Object
com.gigaspaces.lrmi.ConnectionPool

public class ConnectionPool extends Object
ConnectionPool for reuse of LRMI Connections (an LRMI Connection is abstracted by a Client Peer). A Connection Pool facilitates the reuse of connections. An Pooled Client Proxy makes use of a Connection Pool.
Since:
4.0
Author:
Igor Goldenberg
  • Constructor Details

  • Method Details

    • getActiveConnectionsCounter

      public static LongAdder getActiveConnectionsCounter()
    • getConnection

      public ConnectionResource getConnection(LRMIMethod lrmiMethod) throws RemoteException, MalformedURLException
      Returns a connected Client Peer from the pool. If there is an un-used connection in the pool, it is returned; otherwise, a new connection is created and added to the pool. If the pool is full, the caller will be blocked until a free connection is available.
      Throws:
      RemoteException
      MalformedURLException
    • freeConnection

      public void freeConnection(ConnectionResource clientPeer)
      Free a connection (return it to pool).
    • getGeneratedTraffic

      public long getGeneratedTraffic()
    • getReceivedTraffic

      public long getReceivedTraffic()
    • disable

      public void disable()
    • enable

      public void enable()
    • getMonitoringDetails

      public LRMIProxyMonitoringDetailsImpl getMonitoringDetails()
    • close

      public void close()