Interface TransactionManagerMBean
- All Superinterfaces:
QBean, QBeanSupportMBean, QPersist
- All Known Implementing Classes:
TransactionManager
JMX management interface exposing the TransactionManager's queue counters
and TPS (transactions-per-second) metrics.
-
Field Summary
Fields inherited from interface QBean
DESTROYED, FAILED, STARTED, STARTING, stateString, STOPPED, STOPPINGModifier and TypeFieldDescriptionstatic final intQBean has been destroyed.static final intQBean has failed.static final intQBean is running.static final intQBean is in the process of starting.static final String[]Human-readable names for each QBean state, indexed by state constant.static final intQBean is stopped.static final intQBean is in the process of stopping. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of session threads currently processing transactions.longgetHead()Returns the current head index of the transaction queue.intReturns the configured maximum number of concurrent session threads.intReturns the number of in-flight transactions (tail - head).longgetTail()Returns the current tail index of the transaction queue.Returns a human-readable summary of TPS statistics.floatReturns the average transactions-per-second since the last reset.longReturns the elapsed time in milliseconds covered by the current TPS window.intReturns the peak transactions-per-second observed since the last reset.Returns the wall-clock instant at whichgetTPSPeak()was reached.voidresetTPS()Resets the TPS counters and start time.Methods inherited from interface QBean
destroy, getState, getStateAsString, init, start, stopMethods inherited from interface QBeanSupportMBean
getDump, getLoader, getLoaderURLS, getLogger, getName, getRealm, getServer, setLogger, setName, setPersist, setRealm, setServerModifier and TypeMethodDescriptiongetDump()Returns a human-readable dump of this bean's state.Returns the QClassLoader for this bean.URL[]Returns the URLs registered with the class loader.Returns the logger name.getName()Returns the bean name.getRealm()Returns the logging realm.Returns the Q2 server instance.voidSets the logger by name.voidSets the bean name.voidsetPersist(org.jdom2.Element e) Sets the persistent configuration element.voidSets the logging realm.voidSets the Q2 server instance for this QBean.Methods inherited from interface QPersist
getPersist, isModifiedModifier and TypeMethodDescriptionorg.jdom2.ElementReturns the persistent configuration element for this QBean.booleanReturnstrueif this QBean's configuration has been modified since last save.
-
Method Details
-
getHead
-
getTail
-
getOutstandingTransactions
Returns the number of in-flight transactions (tail - head).- Returns:
- outstanding transaction count
-
getActiveSessions
int getActiveSessions()Returns the number of session threads currently processing transactions.- Returns:
- live session count
-
getMaxSessions
int getMaxSessions()Returns the configured maximum number of concurrent session threads.- Returns:
- maximum session count
-
getTPSAsString
Returns a human-readable summary of TPS statistics.- Returns:
- TPS snapshot suitable for diagnostics
-
getTPSAvg
float getTPSAvg()Returns the average transactions-per-second since the last reset.- Returns:
- mean TPS
-
getTPSPeak
int getTPSPeak()Returns the peak transactions-per-second observed since the last reset.- Returns:
- peak TPS
-
getTPSPeakWhen
Returns the wall-clock instant at whichgetTPSPeak()was reached.- Returns:
- timestamp of the TPS peak, or
nullif not yet observed
-
getTPSElapsed
long getTPSElapsed()Returns the elapsed time in milliseconds covered by the current TPS window.- Returns:
- elapsed window in milliseconds
-
resetTPS
void resetTPS()Resets the TPS counters and start time.
-