Class TransactionMetricsAdapter.TransactionMetricsSnapshot
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.transactions.TransactionMetricsAdapter.TransactionMetricsSnapshot
-
- All Implemented Interfaces:
Externalizable,Serializable,TransactionMetrics
- Enclosing class:
- TransactionMetricsAdapter
public static class TransactionMetricsAdapter.TransactionMetricsSnapshot extends Object implements TransactionMetrics, Externalizable
Transaction metrics snapshot.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransactionMetricsSnapshot()Required byExternalizable.TransactionMetricsSnapshot(TransactionMetricsAdapter adapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcommitTime()Gets last time transaction was committed.Map<String,String>getAllOwnerTransactions()Gets a map of all transactions for which the local node is the originating node.longgetLockedKeysNumber()The number of keys locked on the node.Map<String,String>getLongRunningOwnerTransactions(int duration)Gets a map of all transactions for which the local node is the originating node and which duration exceeds the given duration.longgetOwnerTransactionsNumber()The number of active transactions for which this node is the initiator.longgetTransactionsCommittedNumber()The number of transactions which were committed on the local node.longgetTransactionsHoldingLockNumber()The number of active transactions on the local node holding at least one key lock.longgetTransactionsRolledBackNumber()The number of transactions which were rolled back on the local node.voidreadExternal(ObjectInput in)longrollbackTime()Gets last time transaction was rollback.inttxCommits()Gets total number of transaction commits.inttxRollbacks()Gets total number of transaction rollbacks.voidwriteExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
TransactionMetricsSnapshot
public TransactionMetricsSnapshot()
Required byExternalizable.
-
TransactionMetricsSnapshot
public TransactionMetricsSnapshot(TransactionMetricsAdapter adapter)
- Parameters:
adapter- Transaction metrics adapter.
-
-
Method Detail
-
commitTime
public long commitTime()
Gets last time transaction was committed.- Specified by:
commitTimein interfaceTransactionMetrics- Returns:
- Last commit time.
-
rollbackTime
public long rollbackTime()
Gets last time transaction was rollback.- Specified by:
rollbackTimein interfaceTransactionMetrics- Returns:
- Last rollback time.
-
txCommits
public int txCommits()
Gets total number of transaction commits.- Specified by:
txCommitsin interfaceTransactionMetrics- Returns:
- Number of transaction commits.
-
txRollbacks
public int txRollbacks()
Gets total number of transaction rollbacks.- Specified by:
txRollbacksin interfaceTransactionMetrics- Returns:
- Number of transaction rollbacks.
-
getAllOwnerTransactions
public Map<String,String> getAllOwnerTransactions()
Gets a map of all transactions for which the local node is the originating node.- Specified by:
getAllOwnerTransactionsin interfaceTransactionMetrics- Returns:
- Map of local node owning transactions.
-
getLongRunningOwnerTransactions
public Map<String,String> getLongRunningOwnerTransactions(int duration)
Gets a map of all transactions for which the local node is the originating node and which duration exceeds the given duration.- Specified by:
getLongRunningOwnerTransactionsin interfaceTransactionMetrics- Parameters:
duration- Transaction duration.- Returns:
- Map of local node owning transactions which duration is longer than
duration.
-
getTransactionsCommittedNumber
public long getTransactionsCommittedNumber()
The number of transactions which were committed on the local node.- Specified by:
getTransactionsCommittedNumberin interfaceTransactionMetrics- Returns:
- The number of transactions which were committed on the local node.
-
getTransactionsRolledBackNumber
public long getTransactionsRolledBackNumber()
The number of transactions which were rolled back on the local node.- Specified by:
getTransactionsRolledBackNumberin interfaceTransactionMetrics- Returns:
- The number of transactions which were rolled back on the local node.
-
getTransactionsHoldingLockNumber
public long getTransactionsHoldingLockNumber()
The number of active transactions on the local node holding at least one key lock.- Specified by:
getTransactionsHoldingLockNumberin interfaceTransactionMetrics- Returns:
- The number of active transactions holding at least one key lock.
-
getLockedKeysNumber
public long getLockedKeysNumber()
The number of keys locked on the node.- Specified by:
getLockedKeysNumberin interfaceTransactionMetrics- Returns:
- The number of keys locked on the node.
-
getOwnerTransactionsNumber
public long getOwnerTransactionsNumber()
The number of active transactions for which this node is the initiator. Effectively, this method is semantically equivalent togetAllOwnerTransactions.size().- Specified by:
getOwnerTransactionsNumberin interfaceTransactionMetrics- Returns:
- The number of active transactions for which this node is the initiator.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-