Package com.streambase.sb.monitor
Class Snapshot
- java.lang.Object
-
- com.streambase.sb.monitor.Snapshot
-
public class Snapshot extends Object
Stores a snapshot of information from a StreamBase application. Snapshot objects are created by the StreamBaseMonitor class, and consumed by MonitorListeners. New snapshots are produced at regular intervals, depending on the period specified in the StreamBase Server's conf file.- See Also:
StreamBaseMonitor
,MonitorListener
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
containerNames()
Return a list of the names of the current containersIterator<DecisionTableInfo>
decisionTableInfos()
Returns an iterator over all the DecisionTableInfo objects.Set<String>
decisionTableNames()
Returns the set of all decision table names.DecisionTableInfo
getDecisionTableInfo(String name)
Returns information about the specified decision table.ModuleInfo
getModuleInfo(String name)
Returns information about the specified module.OperatorInfo
getOperatorInfo(String name)
Returns information about the specified operator.StreamInfo
getStreamInfo(String name)
Returns information about the specified stream.SystemInfo
getSystemInfo()
The SystemInfo object for this snapshot.ThreadInfo
getThreadInfo(String name)
Returns information about the specified thread.Timestamp
getTimestamp()
Return the time when this snapshot was taken.Iterator<ModuleInfo>
moduleInfos()
Returns an iterator over all the ModuleInfo objects.Set<String>
moduleNames()
Returns the set of all thread names.Iterator<OperatorInfo>
operatorInfos()
Returns an iterator over all the OperatorInfo objects.Set<String>
operatorNames()
Returns the set of all operator names.void
prettyPrint()
Shortcut for prettyPrint(true, true, true, false).protected void
reset()
Reset snapshotIterator<StreamInfo>
streamInfos()
Returns an iterator over all the StreamInfo objects.Set<String>
streamNames()
Returns the set of all stream names.void
terminate()
Ask the StreamBaseMonitor to terminate at the end of the current snapshot.Iterator<ThreadInfo>
threadInfos()
Returns an iterator over all the ThreadInfo objects.Set<String>
threadNames()
Returns the set of all thread names.String
toString()
-
-
-
Method Detail
-
terminate
public void terminate()
Ask the StreamBaseMonitor to terminate at the end of the current snapshot.- See Also:
StreamBaseMonitor.terminate()
-
containerNames
public Set<String> containerNames()
Return a list of the names of the current containers- Returns:
- list of the names of the current containers
-
getSystemInfo
public SystemInfo getSystemInfo()
The SystemInfo object for this snapshot.- Returns:
- the SystemInfo object
-
getOperatorInfo
public OperatorInfo getOperatorInfo(String name)
Returns information about the specified operator.- Parameters:
name
- the operator name- Returns:
- the requested OperatorInfo object
-
getDecisionTableInfo
public DecisionTableInfo getDecisionTableInfo(String name)
Returns information about the specified decision table.- Parameters:
name
- the decision table name- Returns:
- the requested DecisionTableInfo object
-
getThreadInfo
public ThreadInfo getThreadInfo(String name)
Returns information about the specified thread.- Parameters:
name
- the thread name- Returns:
- the requested ThreadInfo object
-
getModuleInfo
public ModuleInfo getModuleInfo(String name)
Returns information about the specified module.- Parameters:
name
- the module name- Returns:
- the requested ModuleInfo object
-
getStreamInfo
public StreamInfo getStreamInfo(String name)
Returns information about the specified stream.- Parameters:
name
- the stream name- Returns:
- the requested StreamInfo object
-
operatorInfos
public Iterator<OperatorInfo> operatorInfos()
Returns an iterator over all the OperatorInfo objects.- Returns:
- an Iterator of OperatorInfos
- See Also:
getOperatorInfo(java.lang.String)
-
operatorNames
public Set<String> operatorNames()
Returns the set of all operator names.- Returns:
- Set of operator names
- See Also:
getOperatorInfo(java.lang.String)
-
decisionTableInfos
public Iterator<DecisionTableInfo> decisionTableInfos()
Returns an iterator over all the DecisionTableInfo objects.- Returns:
- an Iterator of DecisionTableInfo
- See Also:
getDecisionTableInfos()
-
decisionTableNames
public Set<String> decisionTableNames()
Returns the set of all decision table names.- Returns:
- Set of decision table names
- See Also:
getDecisionTableInfo(java.lang.String)
-
threadInfos
public Iterator<ThreadInfo> threadInfos()
Returns an iterator over all the ThreadInfo objects.- Returns:
- an Iterator of ThreadInfos
- See Also:
getThreadInfo(java.lang.String)
-
threadNames
public Set<String> threadNames()
Returns the set of all thread names.- Returns:
- Set of thread names
- See Also:
getThreadInfo(java.lang.String)
-
moduleInfos
public Iterator<ModuleInfo> moduleInfos()
Returns an iterator over all the ModuleInfo objects.- Returns:
- an Iterator of ModuleInfo
- See Also:
getModuleInfo(java.lang.String)
-
moduleNames
public Set<String> moduleNames()
Returns the set of all thread names.- Returns:
- Set of thread names
- See Also:
getThreadInfo(java.lang.String)
-
streamInfos
public Iterator<StreamInfo> streamInfos()
Returns an iterator over all the StreamInfo objects.- Returns:
- an Iterator of StreamInfo
- See Also:
getStreamInfo(java.lang.String)
-
streamNames
public Set<String> streamNames()
Returns the set of all stream names.- Returns:
- Set of stream names
- See Also:
getStreamInfo(java.lang.String)
-
getTimestamp
public Timestamp getTimestamp()
Return the time when this snapshot was taken. It is the timestamp of the first tuple of this snapshot.- Returns:
- timestamp of whhen this snapshot was taken
-
reset
protected void reset()
Reset snapshot
-
prettyPrint
public void prettyPrint()
Shortcut for prettyPrint(true, true, true, false).
-
-