ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++">

DbTxnMgr.stat


import com.sleepycat.db.*;

public DbTxnStat stat() throws DbException;

Description

The stat method creates a DbTxnStat object encapsulating a statistical structure.

The transaction region statistics are stored in a DbTxnStat object. The following data fields are available from the DbTxnStat object:

public int st_refcnt;
The number of references to the region.
public int st_regsize;
The size of the region.
public DbLsn st_last_ckp;
The LSN of the last checkpoint.
public DbLsn st_pending_ckp;
The LSN of any checkpoint that is currently in progress. If st_pending_ckp is the same as st_last_ckp there is no checkpoint in progress.
public long st_time_ckp;
The time the last completed checkpoint finished (as returned by time(2)).
public int st_last_txnid;
The last transaction ID allocated.
public int st_maxtxns;
The maximum number of active transactions supported by the region.
public int st_naborts;
The number of transactions that have aborted.
public int st_nactive;
The number of transactions that are currently active.
public int st_nbegins;
The number of transactions that have begun.
public int st_ncommits;
The number of transactions that have committed.
public int st_region_wait;
The number of times that a thread of control was forced to wait before obtaining the region lock.
public int st_region_nowait;
The number of times that a thread of control was able to obtain the region lock without waiting.
public Active st_txnarray[];
The array of active transactions. Each element of the array is an object of type DbTxnStat.Active, a top level inner class, that has the following fields:

public int txnid;
The Transaction ID.
public DbLsn lsn;
The Lsn of the begin record.

The DbTxnMgr.stat method throws an exception that encapsulates an errno on failure.

Errors

If a fatal error occurs in Berkeley DB, the DbTxnMgr.stat method may fail and throw a DbRunRecoveryException, at which point all subsequent database calls will also fail in the same way.

The DbTxnMgr.stat method may fail and throw an exception for any of the errors specified for the following Berkeley DB and C library functions: abort(3), fcntl(3), fprintf(3), getpid(3), malloc(3), and memset(3).

Class

DbTxnMgr

See Also

DbTxnMgr.begin, DbTxnMgr.checkpoint, DbTxnMgr.close, DbTxnMgr.open, DbTxnMgr.stat and DbTxnMgr.unlink.