/** * Return statistics about this database. * * @param txn transaction handle (not null; not committed) * @return an immutable statistics object. */ public Stat stat(final Txn<T> txn) { if (SHOULD_CHECK) { requireNonNull(txn); txn.checkReady(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_stat(txn.pointer(), ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), stat.f2_ms_branch_pages.longValue(), stat.f3_ms_leaf_pages.longValue(), stat.f4_ms_overflow_pages.longValue(), stat.f5_ms_entries.longValue()); }
/** * Return statistics about this database. * * @param txn transaction handle (not null; not committed) * @return an immutable statistics object. */ public Stat stat(final Txn<T> txn) { if (SHOULD_CHECK) { requireNonNull(txn); txn.checkReady(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_stat(txn.pointer(), ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), stat.f2_ms_branch_pages.longValue(), stat.f3_ms_leaf_pages.longValue(), stat.f4_ms_overflow_pages.longValue(), stat.f5_ms_entries.longValue()); }
/** * Return information about this environment. * * @return an immutable information object. */ public EnvInfo info() { if (closed) { throw new AlreadyClosedException(); } final MDB_envinfo info = new MDB_envinfo(RUNTIME); checkRc(LIB.mdb_env_info(ptr, info)); final long mapAddress; if (info.f0_me_mapaddr.get() == null) { mapAddress = 0; } else { mapAddress = info.f0_me_mapaddr.get().address(); } return new EnvInfo( mapAddress, info.f1_me_mapsize.longValue(), info.f2_me_last_pgno.longValue(), info.f3_me_last_txnid.longValue(), info.f4_me_maxreaders.intValue(), info.f5_me_numreaders.intValue()); }
/** * Return information about this environment. * * @return an immutable information object. */ public EnvInfo info() { if (closed) { throw new AlreadyClosedException(); } final MDB_envinfo info = new MDB_envinfo(RUNTIME); checkRc(LIB.mdb_env_info(ptr, info)); final long mapAddress; if (info.f0_me_mapaddr.get() == null) { mapAddress = 0; } else { mapAddress = info.f0_me_mapaddr.get().address(); } return new EnvInfo( mapAddress, info.f1_me_mapsize.longValue(), info.f2_me_last_pgno.longValue(), info.f3_me_last_txnid.longValue(), info.f4_me_maxreaders.intValue(), info.f5_me_numreaders.intValue()); }
/** * Return statistics about this environment. * * @return an immutable statistics object. */ public Stat stat() { if (closed) { throw new AlreadyClosedException(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_env_stat(ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), stat.f2_ms_branch_pages.longValue(), stat.f3_ms_leaf_pages.longValue(), stat.f4_ms_overflow_pages.longValue(), stat.f5_ms_entries.longValue()); }
/** * Return statistics about this environment. * * @return an immutable statistics object. */ public Stat stat() { if (closed) { throw new AlreadyClosedException(); } final MDB_stat stat = new MDB_stat(RUNTIME); checkRc(LIB.mdb_env_stat(ptr, stat)); return new Stat( stat.f0_ms_psize.intValue(), stat.f1_ms_depth.intValue(), stat.f2_ms_branch_pages.longValue(), stat.f3_ms_leaf_pages.longValue(), stat.f4_ms_overflow_pages.longValue(), stat.f5_ms_entries.longValue()); }