Package com.streambase.sb.monitor
Class StreamInfo
java.lang.Object
com.streambase.sb.monitor.StreamInfo
- All Implemented Interfaces:
Cloneable
Represents information about a stream in a StreamBase Server.
Instances of this class should be retrieved from a Snapshot.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
Calculate tuple delta(package private) void
clear()
Reset stream infoclone()
(package private) void
extractInfo
(StatTuple st) extract stream info from the StatTuple, setting member data as appropriate(package private) void
extractInfo
(com.streambase.sb.monitor.StatTuplev3 st) extract stream info from the StatTuple, setting member data as appropriatelong
Return the number of tuples since the last snapshotlong
Return the total number of tuples on the stream since the stream was createdReturns the StreamProperties of the stream(package private) boolean
isActive()
Contains data?(package private) void
Pretty-print a StreamInfo object to the standard output.(package private) void
Save current tuple counttoString()
Returns a string representation of the StreamInfo object.
-
Constructor Details
-
StreamInfo
StreamInfo(StreamProperties props) Constructor- Parameters:
props
- properties
-
-
Method Details
-
isActive
boolean isActive()Contains data?- Returns:
- true if contains data
-
extractInfo
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
-
saveForNextCycle
void saveForNextCycle()Save current tuple count -
calculate
void calculate()Calculate tuple delta -
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
Returns a string representation of the StreamInfo object. -
prettyPrint
void prettyPrint()Pretty-print a StreamInfo object to the standard output. -
clear
void clear()Reset stream info
-