public final class NetricsTranStats
extends java.lang.Object
Objects of this class hold information on one open transaction. This class also defines constants associated with transactions, such as object transaction states and special transaction ID values.
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_ADDED
This item has been added, but not yet committed.
|
static int |
STATE_DELETED
This item has been deleted, but the delete is not yet committed.
|
static int |
STATE_DIRTY
This is a special state used to test if this object has been modified
by an uncommitted transaction.
|
static int |
STATE_EXIST
The item exists but is not held by a transaction.
|
static int |
STATE_HELD
This item is held by a transaction that is not committed
|
static int |
STATE_MIXED
This item had different states on different nodes.
|
static int |
STATE_NULL
Special state indicating there is no state for this item.
|
static int |
STATE_RENAMED
This item was renamed, but the name change is not committed.
|
static int |
STATE_REPLACED
This item was replaced, but the update is not committed.
|
static int |
STATE_UPDATED
This item has been updated, the update is not committed.
|
static int |
TRAN_ID_NULL
Represents the special null or missing transaction id.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCount()
Return the number of modify operations associated with this
transaction that terminated with an error.
|
int |
getId()
Return the full transaction id.
|
int |
getIdleTime()
Return the idle time for this transaction in seconds.
|
int |
getLogSize()
Return the number of entries in the rollback log of this transaction.
|
int |
getShortId()
Return the short form of the transaction id.
|
boolean |
isExplicit()
Return true if this is an explicit transaction.
|
boolean |
isGatewayTran()
Return true if this is a gateway transaction.
|
boolean |
isImplicit()
Return true if this is an implicit transaction.
|
java.lang.String |
toString()
Return a string that represents the NetricsTranStats object.
|
public static final int STATE_NULL
public static final int STATE_EXIST
public static final int STATE_UPDATED
public static final int STATE_HELD
public static final int STATE_ADDED
public static final int STATE_DELETED
public static final int STATE_RENAMED
public static final int STATE_REPLACED
public static final int STATE_MIXED
public static final int STATE_DIRTY
public static final int TRAN_ID_NULL
public java.lang.String toString()
toString in class java.lang.Objectpublic int getId()
public int getShortId()
public boolean isExplicit()
public boolean isImplicit()
public boolean isGatewayTran()
public int getIdleTime()
If there is no transaction or no idle time it returns -1.
The idle time is the time since the last modify operation associated with this transaction completed. If there are no update operations associated with this transaction it is the time since the transaction was created. If a modify operation is in progress the idle time will be zero.
public int getErrorCount()
If there is no information it returns -1.
Some commands may return an error code but not be considered to have terminated with an error from a transaction point of view. If the command would have committed its results if executed under an implicit transaction it is not considered to have failed. Examples are the checkpoint and restore commands that may return a partial checkpoint or partial restore error, but still commit those operations that succeeded.
public int getLogSize()