- java.lang.Object
-
- com.pervasive.datarush.ports.physical.PortSnapshot
-
- All Implemented Interfaces:
PortStatistics,Serializable
- Direct Known Subclasses:
InputSnapshot,OutputSnapshot
public abstract class PortSnapshot extends Object implements PortStatistics, Serializable
A snapshot of run-time statistics for a dataflow port. The snapshot can be for either an input or output port. Only those statistics shared by both directions are available; additional statistics are available from the subclasses.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<PortSnapshot>asSnapshots(Collection<? extends PortStatistics> ports)Converts a list of statistics into snapshots.longgetBatchCount()Gets the accumulated count of token batches processed by the port.longgetDataDuration()Gets the amount of time data has been flowing through the port, in milliseconds.longgetEODInstant()Gets the time at which EOD was written/read on the port.longgetFirstBatchInstant()Gets the time at which the first batch was written/read on the port.StringgetName()Gets the user-provided label associated with port.PortStatusgetState()Gets the current state of the port.longgetTokenCount()Gets the accumulated count of tokens processed by the port.TokenTypegetType()Gets the type of tokens handled by the port.longgetWaitCount()Get the number of times the port entered a wait state.longgetWaitDuration()Gets the total amount of time the port has spent in a wait state blocked by another process.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pervasive.datarush.ports.physical.PortStatistics
getSnapshot
-
-
-
-
Method Detail
-
getName
public String getName()
Gets the user-provided label associated with port. This is the name which was given when the port was created.- Specified by:
getNamein interfacePortStatistics- Returns:
- the user-assigned name of the port
-
getType
public TokenType getType()
Gets the type of tokens handled by the port.- Specified by:
getTypein interfacePortStatistics- Returns:
- a description of the data type
-
getState
public PortStatus getState()
Gets the current state of the port.- Specified by:
getStatein interfacePortStatistics- Returns:
- the port state
-
getBatchCount
public long getBatchCount()
Gets the accumulated count of token batches processed by the port.- Specified by:
getBatchCountin interfacePortStatistics- Returns:
- the total number of token batches processed
-
getTokenCount
public long getTokenCount()
Gets the accumulated count of tokens processed by the port.- Specified by:
getTokenCountin interfacePortStatistics- Returns:
- the total number of tokens processed
-
getWaitCount
public long getWaitCount()
Get the number of times the port entered a wait state. A wait state is entered when a writer attempts to write to a full queue or a reader attempts to read from an empty queue.- Specified by:
getWaitCountin interfacePortStatistics- Returns:
- the accumulated number of waits
-
getWaitDuration
public long getWaitDuration()
Gets the total amount of time the port has spent in a wait state blocked by another process.- Specified by:
getWaitDurationin interfacePortStatistics- Returns:
- milliseconds spent in a wait state
-
getFirstBatchInstant
public long getFirstBatchInstant()
Description copied from interface:PortStatisticsGets the time at which the first batch was written/read on the port.- Specified by:
getFirstBatchInstantin interfacePortStatistics- Returns:
- the time stamp, expressed as milliseconds since epoch,
of the start of execution. If the first batch has not yet appeared,
LONG.MIN_VALUE.
-
getEODInstant
public long getEODInstant()
Description copied from interface:PortStatisticsGets the time at which EOD was written/read on the port.- Specified by:
getEODInstantin interfacePortStatistics- Returns:
- the time stamp, expressed as milliseconds since epoch,
of the start of execution. If EOD has not yet appeared,
LONG.MIN_VALUE.
-
getDataDuration
public long getDataDuration()
Description copied from interface:PortStatisticsGets the amount of time data has been flowing through the port, in milliseconds. This is measured by wall clock; that is, this is how much time has passed since the moment the first batch was observed until either the moment EOD was observed or the current time, whichever is earlier.- Specified by:
getDataDurationin interfacePortStatistics- Returns:
- the duration of the data flow, in milliseconds.
If the first batch has not yet been seen,
0.
-
asSnapshots
public static List<PortSnapshot> asSnapshots(Collection<? extends PortStatistics> ports)
Converts a list of statistics into snapshots.- Parameters:
ports- live port statistics to capture- Returns:
- snapshots of the specified ports
-
-