public class Snapshot extends 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 Set<String> |
containers |
protected int |
cycle |
protected boolean |
enableOperatorDetails |
protected boolean |
gotBegin |
protected Set<String> |
lastCycleContainers |
protected Map<String,ModuleInfo> |
modInfos |
protected Map<String,String> |
operatorTypes |
protected Map<String,OperatorInfo> |
opInfos |
protected Timestamp |
prev_timestamp |
protected Iterator<Tuple> |
resultIterator |
protected StreamBaseMonitor |
sbMonitor |
protected List<com.streambase.sb.monitor.StatTuple> |
statTuples |
protected Map<String,StreamInfo> |
streamInfos |
protected SystemInfo |
sysInfo |
protected Map<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 |
---|---|
Set<String> |
containerNames()
Return a list of the names of the current containers
|
int |
getCycle()
Returns the cycle number of this snapshot.
|
protected static String |
getModName(String name)
Given a queue name, retrieve the module name.
|
ModuleInfo |
getModuleInfo(String name)
Returns information about the specified module.
|
OperatorInfo |
getOperatorInfo(String name)
Returns information about the specified operator.
|
protected String |
getOperatorType(StreamBaseClient sbClient,
String name) |
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 |
recycle() |
protected void |
reset()
totally reset this snapshot
|
Iterator<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()
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 List<com.streambase.sb.monitor.StatTuple> statTuples
protected Map<String,OperatorInfo> opInfos
protected Map<String,ThreadInfo> thrInfos
protected Map<String,ModuleInfo> modInfos
protected Map<String,StreamInfo> streamInfos
protected SystemInfo sysInfo
protected final StreamBaseMonitor sbMonitor
protected final boolean enableOperatorDetails
protected Timestamp prev_timestamp
protected boolean gotBegin
protected Snapshot(StreamBaseMonitor sbmon, boolean enableOperatorDetails)
public void terminate()
StreamBaseMonitor.terminate()
protected static final String getModName(String name)
name
- protected String getOperatorType(StreamBaseClient sbClient, String name) throws StreamBaseException
StreamBaseException
public Set<String> containerNames()
public SystemInfo getSystemInfo()
public OperatorInfo getOperatorInfo(String name)
name
- the operator namepublic ThreadInfo getThreadInfo(String name)
name
- the thread namepublic ModuleInfo getModuleInfo(String name)
name
- the module namepublic StreamInfo getStreamInfo(String name)
name
- the stream namepublic Iterator<OperatorInfo> operatorInfos()
Snapshot.getOperatorInfo(java.lang.String)
public Set<String> operatorNames()
Snapshot.getOperatorInfo(java.lang.String)
public Iterator<ThreadInfo> threadInfos()
Snapshot.getThreadInfo(java.lang.String)
public Set<String> threadNames()
Snapshot.getThreadInfo(java.lang.String)
public Iterator<ModuleInfo> moduleInfos()
Snapshot.getModuleInfo(java.lang.String)
public Set<String> moduleNames()
Snapshot.getThreadInfo(java.lang.String)
public Iterator<StreamInfo> streamInfos()
Snapshot.getStreamInfo(java.lang.String)
public Set<String> streamNames()
Snapshot.getStreamInfo(java.lang.String)
public int getCycle()
public Timestamp getTimestamp()
protected void reset()
protected void recycle()
public String toString()
public void prettyPrint()