Class StreamInfo

java.lang.Object
com.streambase.sb.monitor.StreamInfo
All Implemented Interfaces:
Cloneable

public class StreamInfo extends Object implements Cloneable
Represents information about a stream in a StreamBase Server. Instances of this class should be retrieved from a Snapshot.
See Also:
  • Constructor Details

    • StreamInfo

      StreamInfo(StreamProperties props)
      Constructor
      Parameters:
      props - properties
  • Method Details

    • isActive

      boolean isActive()
      Contains data?
      Returns:
      true if contains data
    • extractInfo

      void extractInfo(StatTuple st)
      extract stream info from the StatTuple, setting member data as appropriate
      Parameters:
      st - statistics tuple
    • extractInfo

      void extractInfo(com.streambase.sb.monitor.StatTuplev3 st)
      extract stream info from the StatTuple, setting member data as appropriate
      Parameters:
      st - statistics tuple (v3)
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • saveForNextCycle

      void saveForNextCycle()
      Save current tuple count
    • calculate

      void calculate()
      Calculate tuple delta
    • getStreamProperties

      public StreamProperties getStreamProperties()
      Returns the StreamProperties of the stream
      Returns:
      the StreamProperties of the stream
    • getNumTuples

      public long getNumTuples()
      Return the total number of tuples on the stream since the stream was created
      Returns:
      the total number of tuples on the stream since the stream was created
    • getDeltaTuples

      public long getDeltaTuples()
      Return the number of tuples since the last snapshot
      Returns:
      the number of tuples since the last snapshot
    • toString

      public String toString()
      Returns a string representation of the StreamInfo object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.
    • prettyPrint

      void prettyPrint()
      Pretty-print a StreamInfo object to the standard output.
    • clear

      void clear()
      Reset stream info