Class TCPRemoteCommitProvider.HostAddress

java.lang.Object
org.apache.openjpa.event.TCPRemoteCommitProvider.HostAddress
Enclosing class:
TCPRemoteCommitProvider

protected class TCPRemoteCommitProvider.HostAddress extends Object
Utility class to store an InetAddress and an int. Not using InetSocketAddress because it's a JDK1.4 API. This also provides a wrapper around the socket(s) associated with this address.
  • Field Details

    • _address

      protected InetAddress _address
    • _port

      protected int _port
    • _timeLastError

      protected long _timeLastError
    • _isAvailable

      protected boolean _isAvailable
    • _infosIssued

      protected int _infosIssued
    • _socketPool

      protected final org.apache.commons.pool2.impl.GenericObjectPool<Socket> _socketPool
  • Constructor Details

  • Method Details

    • setMaxTotal

      protected void setMaxTotal(int maxTotal)
    • setMaxIdle

      protected void setMaxIdle(int maxIdle)
    • getAddress

      public InetAddress getAddress()
    • getPort

      public int getPort()
    • close

      public void close()
    • sendUpdatePacket

      protected void sendUpdatePacket(byte[] bytes)
    • getSocket

      protected Socket getSocket() throws Exception
      Throws:
      Exception
    • returnSocket

      protected void returnSocket(Socket s) throws Exception
      Throws:
      Exception
    • clearAllSockets

      protected void clearAllSockets()
    • closeSocket

      protected void closeSocket(Socket s)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object