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 SummaryNested ClassesModifier and TypeClassDescription- static final classThe cloneable global values class for the server.- static enumStates.
- Field SummaryFieldsModifier and TypeFieldDescription- longSize of data received.- longSize of data sent.- longThe time of the last activity (never zero).- longThe last web socket heart-beat duration (the PING-PONG message exchange in nanoseconds), zero for none yet.- longElapsed time in nanoseconds for last ping-pong transaction turn-around on the application level, i.e.The map of properties for the connection, null if none are present.- longThe time of the last received transaction, zero for never.- longThe time of the last sent transaction, zero for never.- longThe start time of the connection (never zero).- longThe stop time of the connection, zero for never.- longCount of transactions received.- longCount of transactions sent.
- Method SummaryModifier and TypeMethodDescription- protected SessionConnectionStatistics- clone()Clones this instance.- longGets 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.- voidTransfers properties from another instance, used when reconnecting a session.
- Field Details- timeStartpublic long timeStartThe start time of the connection (never zero).
- timeStoppublic long timeStopThe stop time of the connection, zero for never.
- timeLastSentpublic long timeLastSentThe time of the last sent transaction, zero for never.
- timeLastReceivedpublic long timeLastReceivedThe time of the last received transaction, zero for never.
- lastActivityTimepublic long lastActivityTimeThe time of the last activity (never zero).
- bytesSentpublic long bytesSentSize of data sent.
- bytesReceivedpublic long bytesReceivedSize of data received.
- transactionsSentpublic long transactionsSentCount of transactions sent.
- transactionsReceivedpublic long transactionsReceivedCount of transactions received.
- lastPingPongDurationpublic long lastPingPongDurationElapsed time in nanoseconds for last ping-pong transaction turn-around on the application level, i.e. not at system level like the heart-beat duration that measures more the "link quality". Here the value is more the server-to-app-and-back response time, including queued messages, thread switching, etc.- The value is zero if ping-pong has not been fired yet. 
- lastHeartBeatDurationpublic long lastHeartBeatDurationThe last web socket heart-beat duration (the PING-PONG message exchange in nanoseconds), zero for none yet.
- propertiesThe map of properties for the connection, null if none are present.
 
- Method Details- getGlobalInstanceGets a snapshot of the global instance of the transaction information for the server.
- cloneClones this instance.
- getStateGets the session state, when not the "last" connection, it indicates the last state of this connection.
- getDormantStartTimepublic long getDormantStartTime()Gets the time when the session began to be dormant.- Returns:
- Zero if session is not dormant.
 
- getPropertiesGets a copy of all properties of the last or current connection.- Returns:
- The copy of the properties, or null if none are present.
 
- transferPropertiesTransfers properties from another instance, used when reconnecting a session.