Logo Search packages:      
Sourcecode: db4.2 version File versions  Download package

com::sleepycat::db::Db Class Reference

List of all members.

Detailed Description

The Db handle is the handle for a Berkeley DB database, which may or may not be part of a database environment.

The handle should not be closed while any other handle that refers to the database is in use; for example, database handles must not be closed while cursor handles into the database remain open, or transactions that include operations on the database have not yet been committed or aborted. Once the Db.close, Db.remove, or Db.rename methods are called, the handle may not be accessed again, regardless of the method's return.

Definition at line 27 of file Db.java.

Public Member Functions

void associate (DbTxn txnid, Db secondary, DbSecondaryKeyCreate callback, int flags) throws DbException
synchronized void close (int flags) throws DbException
Dbc cursor (DbTxn txnid, int flags) throws DbException
 Db (DbEnv dbenv, int flags) throws DbException
int del (DbTxn txnid, Dbt key, int flags) throws DbException
int delete (DbTxn txnid, Dbt key, int flags) throws DbException
void err (int error, String message)
void errx (String message)
int get (DbTxn txnid, Dbt key, Dbt pkey, Dbt data, int flags) throws DbException
int get (DbTxn txnid, Dbt key, Dbt data, int flags) throws DbException
int get_bt_minkey () throws DbException
boolean get_byteswapped () throws DbException
long get_cachesize () throws DbException
int get_cachesize_ncache () throws DbException
String get_dbname () throws DbException
int get_encrypt_flags () throws DbException
DbEnv get_env () throws DbException
String get_errpfx ()
String get_filename () throws DbException
int get_flags () throws DbException
int get_flags_raw () throws DbException
int get_h_ffactor () throws DbException
int get_h_nelem () throws DbException
int get_lorder () throws DbException
DbMpoolFile get_mpf () throws DbException
int get_open_flags () throws DbException
int get_pagesize () throws DbException
int get_q_extentsize () throws DbException
int get_re_delim () throws DbException
int get_re_len () throws DbException
int get_re_pad () throws DbException
String get_re_source () throws DbException
boolean get_transactional () throws DbException
int get_type () throws DbException
int getBtreeMinKey () throws DbException
int getByteOrder () throws DbException
long getCacheSize () throws DbException
int getCacheSizeNcache () throws DbException
String getDatabaseName () throws DbException
DbEnv getDbEnv () throws DbException
int getDbType () throws DbException
int getEncryptFlags () throws DbException
String getErrorPrefix ()
String getFileName () throws DbException
int getFlags () throws DbException
int getHashFillFactor () throws DbException
int getHashNumElements () throws DbException
int getOpenFlags () throws DbException
int getPageSize () throws DbException
int getQueueExtentSize () throws DbException
int getRecordDelimiter () throws DbException
int getRecordLength () throws DbException
int getRecordPad () throws DbException
String getRecordSource () throws DbException
boolean isByteSwapped () throws DbException
boolean isEncrypted () throws DbException
boolean isTransactional () throws DbException
Dbc join (Dbc[] curslist, int flags) throws DbException
void key_range (DbTxn txnid, Dbt key, DbKeyRange key_range, int flags) throws DbException
void keyRange (DbTxn txnid, Dbt key, DbKeyRange key_range, int flags) throws DbException
void open (DbTxn txnid, String file, String database, int type, int flags, int mode) throws DbException, java.io.FileNotFoundException, DbDeadlockException, DbLockNotGrantedException
int pget (DbTxn txnid, Dbt key, Dbt pkey, Dbt data, int flags) throws DbException
int put (DbTxn txnid, Dbt key, Dbt data, int flags) throws DbException
synchronized void remove (String file, String database, int flags) throws DbException, java.io.FileNotFoundException
synchronized void rename (String file, String database, String newname, int flags) throws DbException, java.io.FileNotFoundException
void set_append_recno (DbAppendRecno db_append_recno_fcn) throws DbException
void set_bt_compare (DbBtreeCompare bt_compare_fcn) throws DbException
void set_bt_maxkey (int maxkey) throws DbException
void set_bt_minkey (int bt_minkey) throws DbException
void set_bt_prefix (DbBtreePrefix bt_prefix_fcn) throws DbException
void set_cachesize (long bytes, int ncache) throws DbException
void set_cachesize (int gbytes, int bytes, int ncache) throws DbException
void set_dup_compare (DbDupCompare dup_compare_fcn) throws DbException
void set_encrypt (String passwd, int flags) throws DbException
void set_errcall (DbErrcall db_errcall_fcn)
void set_error_stream (java.io.OutputStream stream)
void set_errpfx (String errpfx)
void set_feedback (DbFeedback feedback) throws DbException
void set_flags (int flags) throws DbException
void set_h_ffactor (int h_ffactor) throws DbException
void set_h_hash (DbHash h_hash_fcn) throws DbException
void set_h_nelem (int h_nelem) throws DbException
void set_lorder (int lorder) throws DbException
void set_pagesize (long pagesize) throws DbException
void set_q_extentsize (int extentsize) throws DbException
void set_re_delim (int re_delim) throws DbException
void set_re_len (int re_len) throws DbException
void set_re_pad (int re_pad) throws DbException
void set_re_source (String source) throws DbException
void setAppendRecno (DbAppendRecno db_append_recno_fcn) throws DbException
void setBtreeCompare (DbBtreeCompare bt_compare_fcn) throws DbException
void setBtreeMinKey (int bt_minkey) throws DbException
void setBtreePrefix (DbBtreePrefix bt_prefix_fcn) throws DbException
void setByteOrder (int lorder) throws DbException
void setCacheSize (long bytes, int ncache) throws DbException
void setDuplicateCompare (DbDupCompare dup_compare_fcn) throws DbException
void setEncrypted (String passwd, int flags) throws DbException
void setErrorHandler (DbErrorHandler db_errcall_fcn) throws DbException
void setErrorPrefix (String errpfx)
void setErrorStream (java.io.OutputStream stream)
void setFeedbackHandler (DbFeedbackHandler db_feedback_fcn) throws DbException
void setFlags (int flags) throws DbException
void setHash (DbHash h_hash_fcn) throws DbException
void setHashFillFactor (int h_ffactor) throws DbException
void setHashNumElements (int h_nelem) throws DbException
void setPageSize (long pagesize) throws DbException
void setPanicHandler (DbPanicHandler db_panic_fcn) throws DbException
void setQueueExtentSize (int extentsize) throws DbException
void setRecordDelimiter (int re_delim) throws DbException
void setRecordLength (int re_len) throws DbException
void setRecordPad (int re_pad) throws DbException
void setRecordSource (String source) throws DbException
Object stat (int flags) throws DbException
void sync (int flags) throws DbException
int truncate (DbTxn txnid, int flags) throws DbException
void upgrade (String file, int flags) throws DbException
synchronized void verify (String file, String database, java.io.OutputStream outfile, int flags) throws DbException, java.io.FileNotFoundException

Static Public Attributes

static final int DB_AFTER
static final int DB_AGGRESSIVE
static final int DB_APPEND
static final int DB_ARCH_ABS
static final int DB_ARCH_DATA
static final int DB_ARCH_LOG
static final int DB_ARCH_REMOVE
static final int DB_AUTO_COMMIT
static final int DB_BEFORE
static final int DB_BTREE = 1
static final int DB_CACHED_COUNTS
static final int DB_CDB_ALLDB
static final int DB_CHKSUM
static final int DB_CONSUME
static final int DB_CONSUME_WAIT
static final int DB_CREATE
static final int DB_CURRENT
static final int DB_CXX_NO_EXCEPTIONS
static final int DB_DBT_MALLOC
static final int DB_DBT_PARTIAL
static final int DB_DBT_REALLOC
static final int DB_DBT_USERMEM
static final int DB_DIRECT_DB
static final int DB_DIRECT_LOG
static final int DB_DIRTY_READ
static final int DB_DONOTINDEX = -30999
static final int DB_DUP
static final int DB_DUPSORT
static final int DB_EID_BROADCAST
static final int DB_EID_INVALID
static final int DB_ENCRYPT
static final int DB_ENCRYPT_AES
static final int DB_EXCL
static final int DB_FAST_STAT
static final int DB_FILEOPEN = -30998
static final int DB_FIRST
static final int DB_FLUSH
static final int DB_FORCE
static final int DB_GET_BOTH
static final int DB_GET_BOTH_RANGE
static final int DB_GET_RECNO
static final int DB_HASH = 2
static final int DB_INIT_CDB
static final int DB_INIT_LOCK
static final int DB_INIT_LOG
static final int DB_INIT_MPOOL
static final int DB_INIT_REP
static final int DB_INIT_TXN
static final int DB_JOIN_ITEM
static final int DB_JOIN_NOSORT
static final int DB_JOINENV
static final int DB_KEYEMPTY = -30997
static final int DB_KEYEXIST = -30996
static final int DB_KEYFIRST
static final int DB_KEYLAST
static final int DB_LAST
static final int DB_LOCK_DEADLOCK = -30995
static final int DB_LOCK_DEFAULT
static final int DB_LOCK_EXPIRE
static final int DB_LOCK_GET
static final int DB_LOCK_GET_TIMEOUT
static final int DB_LOCK_IREAD
static final int DB_LOCK_IWR
static final int DB_LOCK_IWRITE
static final int DB_LOCK_MAXLOCKS
static final int DB_LOCK_MINLOCKS
static final int DB_LOCK_MINWRITE
static final int DB_LOCK_NOTGRANTED = -30994
static final int DB_LOCK_NOWAIT
static final int DB_LOCK_OLDEST
static final int DB_LOCK_PUT
static final int DB_LOCK_PUT_ALL
static final int DB_LOCK_PUT_OBJ
static final int DB_LOCK_RANDOM
static final int DB_LOCK_READ
static final int DB_LOCK_TIMEOUT
static final int DB_LOCK_WRITE
static final int DB_LOCK_YOUNGEST
static final int DB_LOCKDOWN
static final int DB_LOG_AUTOREMOVE
static final int DB_MPOOL_NOFILE
static final int DB_MULTIPLE
static final int DB_MULTIPLE_KEY
static final int DB_NEXT
static final int DB_NEXT_DUP
static final int DB_NEXT_NODUP
static final int DB_NODUPDATA
static final int DB_NOLOCKING
static final int DB_NOMMAP
static final int DB_NOORDERCHK
static final int DB_NOOVERWRITE
static final int DB_NOPANIC
static final int DB_NOSERVER = -30993
static final int DB_NOSERVER_HOME = -30992
static final int DB_NOSERVER_ID = -30991
static final int DB_NOSYNC
static final int DB_NOTFOUND = -30990
static final int DB_OLD_VERSION = -30989
static final int DB_ORDERCHKONLY
static final int DB_OVERWRITE
static final int DB_PAGE_NOTFOUND = -30988
static final int DB_PANIC_ENVIRONMENT
static final int DB_POSITION
static final int DB_PREV
static final int DB_PREV_NODUP
static final int DB_PRINTABLE
static final int DB_PRIORITY_DEFAULT
static final int DB_PRIORITY_HIGH
static final int DB_PRIORITY_LOW
static final int DB_PRIORITY_VERY_HIGH
static final int DB_PRIORITY_VERY_LOW
static final int DB_PRIVATE
static final int DB_QUEUE = 4
static final int DB_RDONLY
static final int DB_RECNO = 3
static final int DB_RECNUM
static final int DB_RECORDCOUNT
static final int DB_RECOVER
static final int DB_RECOVER_FATAL
static final int DB_REGION_INIT
static final int DB_RENUMBER
static final int DB_REP_CLIENT
static final int DB_REP_DUPMASTER = -30987
static final int DB_REP_HANDLE_DEAD = -30986
static final int DB_REP_HOLDELECTION = -30985
static final int DB_REP_ISPERM
static final int DB_REP_LOGSONLY
static final int DB_REP_MASTER
static final int DB_REP_NEWMASTER = -30983
static final int DB_REP_NEWSITE = -30982
static final int DB_REP_NOBUFFER
static final int DB_REP_NOTPERM
static final int DB_REP_OUTDATED = -30980
static final int DB_REP_PERMANENT
static final int DB_REP_UNAVAIL
static final int DB_REVSPLITOFF
static final int DB_RMW
static final int DB_RPCCLIENT
static final int DB_RUNRECOVERY = -30978
static final int DB_SALVAGE
static final int DB_SECONDARY_BAD = -30977
static final int DB_SET
static final int DB_SET_LOCK_TIMEOUT
static final int DB_SET_RANGE
static final int DB_SET_RECNO
static final int DB_SET_TXN_TIMEOUT
static final int DB_SNAPSHOT
static final int DB_STAT_CLEAR
static final int DB_SYSTEM_MEM
static final int DB_THREAD
static final int DB_TIME_NOTGRANTED
static final int DB_TRUNCATE
static final int DB_TXN_ABORT = 0
static final int DB_TXN_APPLY = 1
static final int DB_TXN_BACKWARD_ROLL = 3
static final int DB_TXN_FORWARD_ROLL = 4
static final int DB_TXN_NOSYNC
static final int DB_TXN_NOT_DURABLE
static final int DB_TXN_NOWAIT
static final int DB_TXN_PRINT = 8
static final int DB_TXN_SYNC
static final int DB_TXN_WRITE_NOSYNC
static final int DB_UNKNOWN = 5
static final int DB_UPGRADE
static final int DB_USE_ENVIRON
static final int DB_USE_ENVIRON_ROOT
static final int DB_VERB_CHKPOINT
static final int DB_VERB_DEADLOCK
static final int DB_VERB_RECOVERY
static final int DB_VERB_REPLICATION
static final int DB_VERB_WAITSFOR
static final int DB_VERIFY
static final int DB_VERIFY_BAD = -30976
static final int DB_VERSION_MAJOR
static final int DB_VERSION_MINOR
static final int DB_VERSION_PATCH
static final int DB_WRITECURSOR
static final int DB_XA_CREATE
static final int DB_XIDDATASIZE
static final int DB_YIELDCPU

Protected Member Functions

 Db (long cPtr, boolean cMemoryOwn)
void delete ()

Static Protected Member Functions

static long getCPtr (Db obj)

Protected Attributes

boolean swigCMemOwn

Package Functions

int close0 (int flags)
void open0 (DbTxn txnid, String file, String database, int type, int flags, int mode)
void remove0 (String file, String database, int flags)
void rename0 (String file, String database, String newname, int flags)
void verify0 (String file, String database, java.io.OutputStream outfile, int flags)

Static Package Functions

 [static initializer]

Static Package Attributes

static final int GIGABYTE = 1 << 30

Private Member Functions

void cleanup ()
final void handle_append_recno (Dbt data, int recno) throws DbException
final int handle_bt_compare (Dbt dbt1, Dbt dbt2)
final int handle_bt_prefix (Dbt dbt1, Dbt dbt2)
final void handle_db_feedback (int opcode, int percent)
final int handle_dup_compare (Dbt dbt1, Dbt dbt2)
final int handle_h_hash (byte[] data, int len)
final int handle_seckey_create (Dbt key, Dbt data, Dbt result) throws DbException
void initialize (DbEnv dbenv)

Private Attributes

DbAppendRecno append_recno_handler
DbBtreeCompare bt_compare_handler
DbBtreePrefix bt_prefix_handler
DbFeedbackHandler db_feedback_handler
Object db_ref
DbEnv dbenv
DbDupCompare dup_compare_handler
DbHash h_hash_handler
boolean private_dbenv
DbSecondaryKeyCreate seckey_create_handler
long swigCPtr

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index