Class Bandwidth

java.lang.Object
org.deltava.beans.acars.Bandwidth
All Implemented Interfaces:
Comparable<Bandwidth>

public class Bandwidth extends Object implements Comparable<Bandwidth>
A bean to store ACARS bandwidth statistics.
Since:
2.1
Version:
8.0
Author:
Luke
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes the bean.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    long
    Returns the number of inbound bytes during the window.
    long
    Returns the number of outbound bytes during the window.
    long
    Returns the number of bytes saved by data compression during the window.
    int
    Returns the number of connections during the window.
    Returns the start date of the window.
    Returns the end date of the window.
    int
    Returns the number of write errors during the window.
    int
    Returns the window size.
    long
    Returns the maximum number of bytes transferred for the period.
    int
    Returns the maximum number of connections for the period.
    int
    Returns the maximum number of messages for the period.
    int
    Returns the number of inbound messages during the window.
    int
    Returns the number of outbound messages during the window.
    int
     
    void
    setBytes(long bytesIn, long bytesOut)
    Updates the bandwidth during the window.
    void
    setBytesSaved(long bytesSaved)
    Updates the number of bytes saved by data compession
    void
    setConnections(int cons)
    Updates the number of connections during the window.
    void
    setErrors(int errors)
    Updates the number of errors during the window.
    void
    setInterval(int interval)
    Sets the window size.
    void
    setMaxBytes(long bytes)
    Updates the maximum number of bytes transferred for the period.
    void
    Updates the maximum number of connections for the period.
    void
    setMaxMsgs(int msgs)
    Updates the maximum number of messages for the period.
    void
    setMessages(int msgIn, int msgOut)
    Updates the number of messages during the window.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Bandwidth

      public Bandwidth(Instant dt)
      Initializes the bean.
      Parameters:
      dt - the start/date of this window
      Throws:
      NullPointerException - if dt is null
  • Method Details

    • getDate

      public Instant getDate()
      Returns the start date of the window.
      Returns:
      the window start date/time
    • getEndDate

      public Instant getEndDate()
      Returns the end date of the window.
      Returns:
      the window end date/time
    • getInterval

      public int getInterval()
      Returns the window size.
      Returns:
      the window size in minutes
    • getConnections

      public int getConnections()
      Returns the number of connections during the window.
      Returns:
      the number of connections
    • getMsgsIn

      public int getMsgsIn()
      Returns the number of inbound messages during the window.
      Returns:
      the number of messages
    • getMsgsOut

      public int getMsgsOut()
      Returns the number of outbound messages during the window.
      Returns:
      the number of messages
    • getBytesIn

      public long getBytesIn()
      Returns the number of inbound bytes during the window.
      Returns:
      the number of bytes
    • getBytesOut

      public long getBytesOut()
      Returns the number of outbound bytes during the window.
      Returns:
      the number of bytes
    • getBytesSaved

      public long getBytesSaved()
      Returns the number of bytes saved by data compression during the window.
      Returns:
      the number of bytes
    • getErrors

      public int getErrors()
      Returns the number of write errors during the window.
      Returns:
      the number of errors
    • getMaxConnections

      public int getMaxConnections()
      Returns the maximum number of connections for the period.
      Returns:
      the number of connections
    • getMaxMsgs

      public int getMaxMsgs()
      Returns the maximum number of messages for the period.
      Returns:
      the number of messages
    • getMaxBytes

      public long getMaxBytes()
      Returns the maximum number of bytes transferred for the period.
      Returns:
      the number of bytes
    • setConnections

      public void setConnections(int cons)
      Updates the number of connections during the window.
      Parameters:
      cons - the number of connections
    • setErrors

      public void setErrors(int errors)
      Updates the number of errors during the window.
      Parameters:
      errors - the number of errors
    • setMessages

      public void setMessages(int msgIn, int msgOut)
      Updates the number of messages during the window.
      Parameters:
      msgIn - the number of inbound messages
      msgOut - the number of outbound messages
    • setBytes

      public void setBytes(long bytesIn, long bytesOut)
      Updates the bandwidth during the window.
      Parameters:
      bytesIn - the number of bytes in
      bytesOut - the number of bytes out
    • setBytesSaved

      public void setBytesSaved(long bytesSaved)
      Updates the number of bytes saved by data compession
      Parameters:
      bytesSaved - the number of bytes
    • setMaxConnections

      public void setMaxConnections(int cons)
      Updates the maximum number of connections for the period. This is only populated if the window is greater than one minute.
      Parameters:
      cons - the maximum number of connections
    • setMaxMsgs

      public void setMaxMsgs(int msgs)
      Updates the maximum number of messages for the period. This is only populated if the window is greater than one minute.
      Parameters:
      msgs - the maximum number of messages
    • setMaxBytes

      public void setMaxBytes(long bytes)
      Updates the maximum number of bytes transferred for the period. This is only populated if the window is greater than one minute.
      Parameters:
      bytes - the maximum number of bytes
    • setInterval

      public void setInterval(int interval)
      Sets the window size.
      Parameters:
      interval - the size in minutes
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Bandwidth bw2)
      Specified by:
      compareTo in interface Comparable<Bandwidth>