Class ConnectionStats

java.lang.Object
org.deltava.beans.acars.ConnectionStats
All Implemented Interfaces:
Serializable, Comparable<ConnectionStats>

public abstract class ConnectionStats extends Object implements Serializable, Comparable<ConnectionStats>
An abstract class to for objects that can return ACARS connection statistics.
Since:
2.1
Version:
6.4
Author:
Luke
See Also:
  • Field Details

    • _bufferReads

      protected int _bufferReads
    • _bufferWrites

      protected int _bufferWrites
    • _msgsIn

      protected int _msgsIn
    • _msgsOut

      protected int _msgsOut
    • _bytesIn

      protected long _bytesIn
    • _bytesOut

      protected long _bytesOut
    • _bytesSaved

      protected long _bytesSaved
    • _writeErrors

      protected int _writeErrors
  • Constructor Details

    • ConnectionStats

      protected ConnectionStats(String id)
      Creates a new statistics object.
      Parameters:
      id - the ID
    • ConnectionStats

      protected ConnectionStats(ConnectionStats cs)
  • Method Details

    • getID

      public String getID()
      Returns the ACARS connection ID.
      Returns:
      the protocol and connection ID
    • getMsgsIn

      public int getMsgsIn()
      Returns the number of messages received on this connection.
      Returns:
      the number of messages
    • getMsgsOut

      public int getMsgsOut()
      Returns the number of messages sent on this connection.
      Returns:
      the number of messages
    • getBufferReads

      public int getBufferReads()
      Returns the number of buffer reads made on this connection.
      Returns:
      the number of reads
    • getBufferWrites

      public int getBufferWrites()
      Returns the number of buffer writes made on this connection.
      Returns:
      the number of writes
    • getBytesIn

      public long getBytesIn()
      Returns the number of bytes received on this connection.
      Returns:
      the number of bytes
    • getBytesOut

      public long getBytesOut()
      Returns the number of bytes sent on this connection.
      Returns:
      the number of bytes
    • getBytesSaved

      public long getBytesSaved()
      Returns the number of bytes saved via compression.
      Returns:
      the number of bytes
    • getWriteErrors

      public int getWriteErrors()
      Returns the number of write errors on this connection.
      Returns:
      the number of timed out writes
    • hashCode

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

      public int compareTo(ConnectionStats cs2)
      Specified by:
      compareTo in interface Comparable<ConnectionStats>