Class PeerConnectionPool

java.lang.Object
org.jppf.server.peer.PeerConnectionPool
All Implemented Interfaces:
EventListener, org.jppf.comm.recovery.HeartbeatConnectionListener

public class PeerConnectionPool extends Object implements org.jppf.comm.recovery.HeartbeatConnectionListener
Author:
Laurent Cohen
  • Constructor Details

    • PeerConnectionPool

      public PeerConnectionPool(JPPFDriver driver, String peerName, int size, org.jppf.comm.discovery.JPPFConnectionInformation connectionInfo, boolean secure, boolean fromDiscovery)
      Initialize this connection pool.
      Parameters:
      driver - reference to the JPPF driver.
      size - the size of this pool.
      peerName - name of the peer in the configuration file.
      connectionInfo - the peer connection information.
      secure - determines whether communication with remote peer servers should be secure.
      fromDiscovery - whether this connection and its pool were created by the discovery mechanism.
  • Method Details

    • getPeerName

      public String getPeerName()
      Returns:
      the name of the peer in the configuration file.
    • getConnectionInfo

      public org.jppf.comm.discovery.JPPFConnectionInformation getConnectionInfo()
      Returns:
      the peer connection information.
    • isSecure

      public boolean isSecure()
      Returns:
      whether communication with remote peer servers should be secure.
    • isFromDiscovery

      public boolean isFromDiscovery()
      Returns:
      whether this connection and its pool were created by the discovery mechanism.
    • getSize

      public int getSize()
      Returns:
      the size of this pool.
    • setSize

      public void setSize(int size)
      Set the size of this pool.
      Parameters:
      size - the pool size to set.
    • close

      public void close()
    • getRecoveryConnection

      public org.jppf.comm.recovery.HeartbeatConnection getRecoveryConnection()
      Returns:
      the connection to the recovery server.
    • heartbeatConnectionFailed

      public void heartbeatConnectionFailed(org.jppf.comm.recovery.HeartbeatConnectionEvent event)
      Specified by:
      heartbeatConnectionFailed in interface org.jppf.comm.recovery.HeartbeatConnectionListener
    • toString

      public String toString()
      Overrides:
      toString in class Object