Package com.sun.jts.CosTransactions
Class AdminUtil
- java.lang.Object
-
- com.sun.jts.CosTransactions.AdminUtil
-
public class AdminUtil extends Object
AdminUtil - Utility class for monitoring and administering jts. This class is used by admin utilities for performing monitoring and administration.- Version:
- 1.0
- Author:
- Ajay Kumar
-
-
Constructor Summary
Constructors Constructor Description AdminUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
freezeAll()
freezeAll Freeze all transactional activity.static long
getAbortedTransactionCount()
Return the count of rolledback transactions.static long
getActiveTransactionCount()
Return the number of transactions that are active currently.static Enumeration
getAllTIDs()
Returned enumeration of globaltids of existing transactions.static Collection
getAllTransactions()
Returns the collection of existing coordinators.static long
getCommitedTransactionCount()
Return the committed transactions count.static long
getPendingTransactionCount()
Return the count of transactions that are prepared - but not completed.static long
getRecoveryAbortedTransactionCount()
Return the number of transactions that were rolled back as part of the recovery process.static long
getRecoveryCommitedTransactionCount()
Return the count of transactions that were commited as part of the recovery process.static long
getSamplingDuration()
Returns the duration for which the last sampling window was open, in milliseconds.static long
getSamplingEndTime()
Returns the time in millisecond , since the begining of time, when the sampling window was closed.static long
getSamplingStartTime()
Returns the time in milliseconds, since the begining of time, when the sampling window was started.static void
incrementRecoveryAbortedTransactionCount()
Increments the number of transactions that were rolled back as part of the recovery process.static void
incrementRecoveryCommitedTransactionCount()
Increments the number of transactions that were commited as part of the recovery process.static boolean
isFrozenAll()
isFrozenAll Get the current state.static void
startSampling()
startSampling Start the sampling window.static void
stopSampling()
stopSampling Stop sampling the statitics values.static void
unfreezeAll()
unfreezeAll Unfreeze all transactional activity frozen by a freezeAll call.
-
-
-
Method Detail
-
freezeAll
public static void freezeAll()
freezeAll Freeze all transactional activity. Part of freezing functions that will be used to achive a transactional quiet period before taking any action or collecting any statistics. This call returns when all the activities are frozen. All the states would be allowed to complete before freezing on. For example a transaction in preparing state would be allowed to transition to next state - the prepared state.
-
unfreezeAll
public static void unfreezeAll()
unfreezeAll Unfreeze all transactional activity frozen by a freezeAll call. Part of freezing functions that will be used to achive a transactional quiet period before taking any action or collecting any statistics. This call returns almost immediately.
-
isFrozenAll
public static boolean isFrozenAll()
isFrozenAll Get the current state. Part of freezing functions that will be used to achive a transactional quiet period before taking any action or collecting any statistics. This call returns almost immediately.
-
startSampling
public static void startSampling()
startSampling Start the sampling window. The sample window determines the duration in which the data is collected. Start and stop calls demarcate the the window. The sampling data could be number of transactions committed ,rolledback etc and transient data like pending etc. It also resets various counters.- See Also:
stopSampling()
-
stopSampling
public static void stopSampling()
stopSampling Stop sampling the statitics values. This is used to indicate end of sampling window.- See Also:
startSampling()
-
incrementRecoveryCommitedTransactionCount
public static void incrementRecoveryCommitedTransactionCount()
Increments the number of transactions that were commited as part of the recovery process.
-
incrementRecoveryAbortedTransactionCount
public static void incrementRecoveryAbortedTransactionCount()
Increments the number of transactions that were rolled back as part of the recovery process.
-
getCommitedTransactionCount
public static long getCommitedTransactionCount()
Return the committed transactions count.
-
getAbortedTransactionCount
public static long getAbortedTransactionCount()
Return the count of rolledback transactions.
-
getActiveTransactionCount
public static long getActiveTransactionCount()
Return the number of transactions that are active currently.
-
getPendingTransactionCount
public static long getPendingTransactionCount()
Return the count of transactions that are prepared - but not completed. This includes the total transactions that ever entered into prepared state minus ones which got committed, rolledback, taking care of ones that were rolledback without entering prepared state.
-
getRecoveryCommitedTransactionCount
public static long getRecoveryCommitedTransactionCount()
Return the count of transactions that were commited as part of the recovery process.
-
getRecoveryAbortedTransactionCount
public static long getRecoveryAbortedTransactionCount()
Return the number of transactions that were rolled back as part of the recovery process.
-
getSamplingStartTime
public static long getSamplingStartTime()
Returns the time in milliseconds, since the begining of time, when the sampling window was started.
-
getSamplingEndTime
public static long getSamplingEndTime()
Returns the time in millisecond , since the begining of time, when the sampling window was closed.
-
getSamplingDuration
public static long getSamplingDuration()
Returns the duration for which the last sampling window was open, in milliseconds. If the sampling window is still open, then the running duration is returned.
-
getAllTransactions
public static Collection getAllTransactions()
Returns the collection of existing coordinators.
-
getAllTIDs
public static Enumeration getAllTIDs()
Returned enumeration of globaltids of existing transactions.
-
-