|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sleepycat.bdb.DataDb
(internal) Wraps a Berkeley DB database (Db) object and adds normalization of certain flags and environment modes.
NOTE: This classes is internal and may be changed incompatibly or deleted in the future. It is public only so it may be used by subpackages.
Field Summary | |
static int |
EINVAL
|
static int |
ENOMEM
|
static int |
FLAGS_MOD_MASK
|
static int |
FLAGS_POS_MASK
|
Constructor Summary | |
DataDb(Db db)
Creates a database wrapper. |
Method Summary | |
boolean |
areDuplicatesAllowed()
Returns whether duplicates are allowed for the database. |
boolean |
areDuplicatesOrdered()
Returns whether duplicates are ordered for the database. |
boolean |
areKeysRenumbered()
Returns whether keys (record numbers) are renumbered for the database. |
void |
close()
Closes the database. |
void |
closeCursor(Dbc cursor)
Closes a cursor for this database. |
int |
delete(DataThang key,
int flags)
Performs a general database 'delete' operation. |
Dbc |
dupCursor(Dbc cursor,
boolean writeCursor,
int flags)
Duplicates a cursor for this database. |
int |
get(DataThang key,
DataThang data,
int flags)
Performs a general database 'get' operation. |
int |
get(Dbc cursor,
DataThang key,
DataThang val,
int flags)
Performs a general database 'get' operation via a cursor. |
Db |
getDb()
Returns the underlying database. |
com.sleepycat.bdb.DataEnvironment |
getEnv()
Returns the environment. |
boolean |
hasRecNumAccess()
Returns whether record number access is allowed. |
boolean |
isDirtyReadAllowed()
Returns whether dirty-read is allowed for the database. |
boolean |
isOrdered()
Returns whether keys are ordered for the database. |
boolean |
isTransactional()
Returns whether the database was opened in a transaction and therefore must be written in a transaction. |
Dbc |
openCursor(boolean writeCursor)
Opens a cursor for this database. |
int |
put(DataThang key,
DataThang data,
int flags)
Performs a general database 'put' operation. |
int |
put(Dbc cursor,
DataThang key,
DataThang data,
int flags)
Performs a general database 'put' operation via a cursor. |
String |
toString()
Returns a debugging string containing the database name. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ENOMEM
public static final int EINVAL
public static final int FLAGS_POS_MASK
public static final int FLAGS_MOD_MASK
Constructor Detail |
public DataDb(Db db)
db
- is the underlying database.Method Detail |
public void close() throws DbException
DbException
public final com.sleepycat.bdb.DataEnvironment getEnv()
public final Db getDb()
public final boolean isOrdered()
public final boolean areDuplicatesAllowed()
public final boolean areDuplicatesOrdered()
public final boolean areKeysRenumbered()
public final boolean hasRecNumAccess()
public final boolean isTransactional()
public final boolean isDirtyReadAllowed()
public int get(DataThang key, DataThang data, int flags) throws DbException
key
- the key thang.data
- the data thang.flags
- the low-level get flags.
DbException
- if a database problem occurs.public int get(Dbc cursor, DataThang key, DataThang val, int flags) throws DbException
cursor
- the cursor to read.key
- the key thang.val
- the data thang.flags
- the low-level get flags.
DbException
- if a database problem occurs.public int put(DataThang key, DataThang data, int flags) throws DbException
key
- the key to put.data
- the data to put.flags
- the low-level put flags.
DbException
- if a database problem occurs.public int put(Dbc cursor, DataThang key, DataThang data, int flags) throws DbException
cursor
- the cursor to write.key
- the key to put.data
- the data to put.flags
- the low-level put flags.
DbException
- if a database problem occurs.public int delete(DataThang key, int flags) throws DbException
key
- the key to delete.flags
- the low-level delete flags.
DbException
- if a database problem occurs.public Dbc openCursor(boolean writeCursor) throws DbException
writeCursor
- true to open a write cursor in a CDB environment, and
ignored for other environments.
DbException
- if a database problem occurs.public Dbc dupCursor(Dbc cursor, boolean writeCursor, int flags) throws DbException
writeCursor
- true to open a write cursor in a CDB environment, and
ignored for other environments.flags
- the low-level dup() flags.
DbException
- if a database problem occurs.public void closeCursor(Dbc cursor) throws DbException
cursor
- the cursor to close.
DbException
- if a database problem occurs.public String toString()
toString
in class Object
|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |