Interface PortStatistics

All Known Subinterfaces:
InputStatistics, OutputStatistics
All Known Implementing Classes:
InputSnapshot, OutputSnapshot, PortSnapshot

public interface PortStatistics
Live run-time statistics for a dataflow port.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the accumulated count of token batches processed by the port.
    long
    Gets the amount of time data has been flowing through the port, in milliseconds.
    long
    Gets the time at which EOD was written/read on the port.
    long
    Gets the time at which the first batch was written/read on the port.
    Gets the user-provided label associated with port.
    Gets a snapshot of the current statistics.
    Gets the current state of the port.
    long
    Gets the accumulated count of tokens processed by the port.
    Gets the type of tokens handled by the port.
    long
    Get the number of times the port entered a wait state.
    long
    Gets the total amount of time the port has spent in a wait state blocked by another process.
  • Method Details

    • getName

      String getName()
      Gets the user-provided label associated with port. This is the name which was given when the port was created.
      Returns:
      the user-assigned name of the port
    • getType

      TokenType getType()
      Gets the type of tokens handled by the port.
      Returns:
      the data type of the port
    • getState

      PortStatus getState()
      Gets the current state of the port.
      Returns:
      the port state
    • getTokenCount

      long getTokenCount()
      Gets the accumulated count of tokens processed by the port.
      Returns:
      the total number of tokens processed
    • getBatchCount

      long getBatchCount()
      Gets the accumulated count of token batches processed by the port.
      Returns:
      the total number of token batches processed
    • getWaitCount

      long getWaitCount()
      Get the number of times the port entered a wait state. A wait state is entered when a writer attempts to write to a full queue or a reader attempts to read from an empty queue.
      Returns:
      the accumulated number of waits
    • getWaitDuration

      long getWaitDuration()
      Gets the total amount of time the port has spent in a wait state blocked by another process.
      Returns:
      milliseconds spent in a wait state
    • getFirstBatchInstant

      long getFirstBatchInstant()
      Gets the time at which the first batch was written/read on the port.
      Returns:
      the time stamp, expressed as milliseconds since epoch, of the start of execution. If the first batch has not yet appeared, LONG.MIN_VALUE.
    • getEODInstant

      long getEODInstant()
      Gets the time at which EOD was written/read on the port.
      Returns:
      the time stamp, expressed as milliseconds since epoch, of the start of execution. If EOD has not yet appeared, LONG.MIN_VALUE.
    • getDataDuration

      long getDataDuration()
      Gets the amount of time data has been flowing through the port, in milliseconds. This is measured by wall clock; that is, this is how much time has passed since the moment the first batch was observed until either the moment EOD was observed or the current time, whichever is earlier.
      Returns:
      the duration of the data flow, in milliseconds. If the first batch has not yet been seen, 0.
    • getSnapshot

      PortSnapshot getSnapshot()
      Gets a snapshot of the current statistics.
      Returns:
      an immutable copy of the statistics