Package com.iizix.comm.statistics
Class SessionConnectionStatistics
java.lang.Object
com.iizix.comm.statistics.SessionConnectionStatistics
- All Implemented Interfaces:
Cloneable
Session connection statistics used on a connection basis.
- Author:
- Christopher Mindus
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The cloneable global values class for the server.static enum
States.Field Summary
Modifier and TypeFieldDescriptionlong
Size of data received.long
Size of data sent.long
The time of the last activity (never zero).long
The last web socket heart-beat duration (the PING-PONG message exchange in milliseconds), zero for none yet.long
Elapsed time in milliseconds for last ping-pong transaction turn-around.The map of properties for the connection, null if none are present.long
The time of the last received transaction, zero for never.long
The time of the last sent transaction, zero for never.long
The start time of the connection (never zero).long
The stop time of the connection, zero for never.long
Count of transactions received.long
Count of transactions sent.Method Summary
Modifier and TypeMethodDescriptionprotected SessionConnectionStatistics
clone()
Clones this instance.long
Gets the time when the session began to be dormant.Gets a snapshot of the global instance of the transaction information for the server.Gets a copy of all properties of the last or current connection.getState()
Gets the session state, when not the "last" connection, it indicates the last state of this connection.void
Transfers properties from another instance, used when reconnecting a session.
Field Details
timeStart
public long timeStartThe start time of the connection (never zero).timeStop
public long timeStopThe stop time of the connection, zero for never.timeLastSent
public long timeLastSentThe time of the last sent transaction, zero for never.timeLastReceived
public long timeLastReceivedThe time of the last received transaction, zero for never.lastActivityTime
public long lastActivityTimeThe time of the last activity (never zero).bytesSent
public long bytesSentSize of data sent.bytesReceived
public long bytesReceivedSize of data received.transactionsSent
public long transactionsSentCount of transactions sent.transactionsReceived
public long transactionsReceivedCount of transactions received.lastPingPongDuration
public long lastPingPongDurationElapsed time in milliseconds for last ping-pong transaction turn-around.The value is zero if ping-pong has not been fired yet.
lastHeartBeatDuration
public long lastHeartBeatDurationThe last web socket heart-beat duration (the PING-PONG message exchange in milliseconds), zero for none yet.properties
The map of properties for the connection, null if none are present.
Method Details
getGlobalInstance
Gets a snapshot of the global instance of the transaction information for the server.clone
Clones this instance.getState
Gets the session state, when not the "last" connection, it indicates the last state of this connection.getDormantStartTime
public long getDormantStartTime()Gets the time when the session began to be dormant.- Returns:
- Zero if session is not dormant.
getProperties
Gets a copy of all properties of the last or current connection.- Returns:
- The copy of the properties, or null if none are present.
transferProperties
Transfers properties from another instance, used when reconnecting a session.