public class Snapshot
extends java.lang.Object
StreamBaseMonitor
,
MonitorListener
Modifier and Type | Class and Description |
---|---|
protected static interface |
Snapshot.Source |
protected static class |
Snapshot.Status |
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
containers |
protected int |
cycle |
protected boolean |
enableOperatorDetails |
protected boolean |
gotBegin |
protected java.util.Set<java.lang.String> |
lastCycleContainers |
protected java.util.Map<java.lang.String,ModuleInfo> |
modInfos |
protected java.util.Map<java.lang.String,java.lang.String> |
operatorTypes |
protected java.util.Map<java.lang.String,OperatorInfo> |
opInfos |
protected Timestamp |
prev_timestamp |
protected java.util.Iterator<Tuple> |
resultIterator |
protected StreamBaseMonitor |
sbMonitor |
protected java.util.List<com.streambase.sb.monitor.StatTuple> |
statTuples |
protected java.util.Map<java.lang.String,StreamInfo> |
streamInfos |
protected SystemInfo |
sysInfo |
protected java.util.Map<java.lang.String,ThreadInfo> |
thrInfos |
static long |
TICKS_PER_MICROSECOND |
static long |
TICKS_PER_MILLISECOND |
Modifier | Constructor and Description |
---|---|
protected |
Snapshot(StreamBaseMonitor sbmon,
boolean enableOperatorDetails) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
containerNames()
Return a list of the names of the current containers
|
int |
getCycle()
Returns the cycle number of this snapshot.
|
protected static java.lang.String |
getModName(java.lang.String name)
Given a queue name, retrieve the module name.
|
ModuleInfo |
getModuleInfo(java.lang.String name)
Returns information about the specified module.
|
OperatorInfo |
getOperatorInfo(java.lang.String name)
Returns information about the specified operator.
|
protected java.lang.String |
getOperatorType(StreamBaseClient sbClient,
java.lang.String name) |
StreamInfo |
getStreamInfo(java.lang.String name)
Returns information about the specified stream.
|
SystemInfo |
getSystemInfo()
The SystemInfo object for this snapshot.
|
ThreadInfo |
getThreadInfo(java.lang.String name)
Returns information about the specified thread.
|
Timestamp |
getTimestamp()
Return the time when this snapshot was taken.
|
java.util.Iterator<ModuleInfo> |
moduleInfos()
Returns an iterator over all the ModuleInfo objects.
|
java.util.Set<java.lang.String> |
moduleNames()
Returns the set of all thread names.
|
java.util.Iterator<OperatorInfo> |
operatorInfos()
Returns an iterator over all the OperatorInfo objects.
|
java.util.Set<java.lang.String> |
operatorNames()
Returns the set of all operator names.
|
void |
prettyPrint()
Shortcut for prettyPrint(true, true, true, false).
|
protected void |
recycle() |
protected void |
reset()
totally reset this snapshot
|
java.util.Iterator<StreamInfo> |
streamInfos()
Returns an iterator over all the StreamInfo objects.
|
java.util.Set<java.lang.String> |
streamNames()
Returns the set of all stream names.
|
void |
terminate()
Ask the StreamBaseMonitor to terminate at the end of the current
snapshot.
|
java.util.Iterator<ThreadInfo> |
threadInfos()
Returns an iterator over all the ThreadInfo objects.
|
java.util.Set<java.lang.String> |
threadNames()
Returns the set of all thread names.
|
java.lang.String |
toString()
Returns a string representation of the Snapshot object.
|
public static final long TICKS_PER_MILLISECOND
public static final long TICKS_PER_MICROSECOND
protected int cycle
protected java.util.List<com.streambase.sb.monitor.StatTuple> statTuples
protected java.util.Set<java.lang.String> containers
protected java.util.Map<java.lang.String,java.lang.String> operatorTypes
protected java.util.Set<java.lang.String> lastCycleContainers
protected java.util.Map<java.lang.String,OperatorInfo> opInfos
protected java.util.Map<java.lang.String,ThreadInfo> thrInfos
protected java.util.Map<java.lang.String,ModuleInfo> modInfos
protected java.util.Map<java.lang.String,StreamInfo> streamInfos
protected SystemInfo sysInfo
protected final StreamBaseMonitor sbMonitor
protected final boolean enableOperatorDetails
protected Timestamp prev_timestamp
protected boolean gotBegin
protected java.util.Iterator<Tuple> resultIterator
protected Snapshot(StreamBaseMonitor sbmon, boolean enableOperatorDetails)
public void terminate()
StreamBaseMonitor.terminate()
protected static final java.lang.String getModName(java.lang.String name)
name
- protected java.lang.String getOperatorType(StreamBaseClient sbClient, java.lang.String name) throws StreamBaseException
StreamBaseException
public java.util.Set<java.lang.String> containerNames()
public SystemInfo getSystemInfo()
public OperatorInfo getOperatorInfo(java.lang.String name)
name
- the operator namepublic ThreadInfo getThreadInfo(java.lang.String name)
name
- the thread namepublic ModuleInfo getModuleInfo(java.lang.String name)
name
- the module namepublic StreamInfo getStreamInfo(java.lang.String name)
name
- the stream namepublic java.util.Iterator<OperatorInfo> operatorInfos()
Snapshot.getOperatorInfo(java.lang.String)
public java.util.Set<java.lang.String> operatorNames()
Snapshot.getOperatorInfo(java.lang.String)
public java.util.Iterator<ThreadInfo> threadInfos()
Snapshot.getThreadInfo(java.lang.String)
public java.util.Set<java.lang.String> threadNames()
Snapshot.getThreadInfo(java.lang.String)
public java.util.Iterator<ModuleInfo> moduleInfos()
Snapshot.getModuleInfo(java.lang.String)
public java.util.Set<java.lang.String> moduleNames()
Snapshot.getThreadInfo(java.lang.String)
public java.util.Iterator<StreamInfo> streamInfos()
Snapshot.getStreamInfo(java.lang.String)
public java.util.Set<java.lang.String> streamNames()
Snapshot.getStreamInfo(java.lang.String)
public int getCycle()
public Timestamp getTimestamp()
protected void reset()
protected void recycle()
public java.lang.String toString()
toString
in class java.lang.Object
public void prettyPrint()