|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.Cursor
public class Cursor
Javadoc for this public class is generated via the doc templates in the doc_src directory.
Field Summary | |
---|---|
(package private) CursorConfig |
config
The CursorConfig used to configure this cursor. |
(package private) CursorImpl |
cursorImpl
The underlying cursor. |
Constructor Summary | |
---|---|
Cursor(Cursor cursor,
boolean samePosition)
Copy constructor. |
|
Cursor(DatabaseImpl dbImpl,
Locker locker,
CursorConfig cursorConfig)
Creates a cursor for a given locker and no db handle. |
|
Cursor(Database dbHandle,
Locker locker,
CursorConfig cursorConfig)
Creates a cursor for a given locker. |
|
Cursor(Database dbHandle,
Transaction txn,
CursorConfig cursorConfig)
Creates a cursor for a given user transaction. |
Method Summary | |
---|---|
(package private) boolean |
advanceCursor(DatabaseEntry key,
DatabaseEntry data)
|
(package private) void |
checkEnv()
|
(package private) void |
checkState(boolean mustBeInitialized)
Check the environment and cursor state. |
protected void |
checkUpdatesAllowed(String operation)
|
void |
close()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
int |
count()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) int |
countInternal()
Counts duplicates without parameter checking. |
OperationStatus |
delete()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) OperationStatus |
deleteInternal()
Internal version of delete() that does no parameter checking. |
(package private) OperationStatus |
deleteNoNotify()
Clone the cursor, delete at current position, and if successful, swap cursors. |
Cursor |
dup(boolean samePosition)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
CursorConfig |
getConfig()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getCurrent(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) OperationStatus |
getCurrentInternal(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Returns the current key and data. |
(package private) CursorImpl |
getCursorImpl()
Internal entrypoint. |
Database |
getDatabase()
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) DatabaseImpl |
getDatabaseImpl()
Always returns non-null, while getDatabase() returns null if no handle is associated with this cursor. |
OperationStatus |
getFirst(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getLast(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getNext(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getNextDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getNextNoDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getPrev(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getPrevDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getPrevNoDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getSearchBoth(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getSearchBothRange(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getSearchKey(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
getSearchKeyRange(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) boolean |
isReadUncommittedMode(LockMode lockMode)
Returns whether the given lock mode will cause a read-uncommitted when used with this cursor, taking into account the default cursor configuration. |
(package private) OperationStatus |
position(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode,
boolean first)
Position the cursor at the first or last record of the database. |
OperationStatus |
put(DatabaseEntry key,
DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
OperationStatus |
putCurrent(DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) OperationStatus |
putInternal(DatabaseEntry key,
DatabaseEntry data,
PutMode putMode)
Internal version of put() that does no parameter checking. |
OperationStatus |
putNoDupData(DatabaseEntry key,
DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) OperationStatus |
putNoNotify(DatabaseEntry key,
DatabaseEntry data,
PutMode putMode,
DatabaseEntry returnOldData)
Performs the put operation but does not notify triggers (does not perform secondary updates). |
OperationStatus |
putNoOverwrite(DatabaseEntry key,
DatabaseEntry data)
Javadoc for this public method is generated via the doc templates in the doc_src directory. |
(package private) OperationStatus |
retrieveNext(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode,
GetMode getMode)
Retrieve the next or previous record. |
(package private) OperationStatus |
search(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode,
CursorImpl.SearchMode searchMode)
Perform search by key, data, or both. |
(package private) void |
trace(Level level,
String methodName,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Send trace messages to the java.util.logger. |
(package private) void |
trace(Level level,
String methodName,
LockMode lockMode)
Send trace messages to the java.util.logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
CursorImpl cursorImpl
CursorConfig config
Constructor Detail |
---|
Cursor(Database dbHandle, Transaction txn, CursorConfig cursorConfig) throws DatabaseException
If txn is null, a non-transactional cursor will be created that releases locks for the prior operation when the next operation suceeds.
DatabaseException
Cursor(Database dbHandle, Locker locker, CursorConfig cursorConfig) throws DatabaseException
If locker is null or is non-transactional, a non-transactional cursor will be created that releases locks for the prior operation when the next operation suceeds.
DatabaseException
Cursor(DatabaseImpl dbImpl, Locker locker, CursorConfig cursorConfig) throws DatabaseException
The locker parameter must be non-null. With this constructor, we use the given locker without applying any special rules for different isolation levels -- the caller must supply the correct locker.
DatabaseException
Cursor(Cursor cursor, boolean samePosition) throws DatabaseException
DatabaseException
Method Detail |
---|
CursorImpl getCursorImpl()
public Database getDatabase()
DatabaseImpl getDatabaseImpl()
public CursorConfig getConfig()
public void close() throws DatabaseException
DatabaseException
public int count() throws DatabaseException
DatabaseException
public Cursor dup(boolean samePosition) throws DatabaseException
DatabaseException
public OperationStatus delete() throws DatabaseException
DatabaseException
public OperationStatus put(DatabaseEntry key, DatabaseEntry data) throws DatabaseException
DatabaseException
public OperationStatus putNoOverwrite(DatabaseEntry key, DatabaseEntry data) throws DatabaseException
DatabaseException
public OperationStatus putNoDupData(DatabaseEntry key, DatabaseEntry data) throws DatabaseException
DatabaseException
public OperationStatus putCurrent(DatabaseEntry data) throws DatabaseException
DatabaseException
public OperationStatus getCurrent(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getFirst(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getLast(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getNext(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getNextDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getNextNoDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getPrev(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getPrevDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getPrevNoDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getSearchKey(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getSearchKeyRange(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getSearchBoth(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
public OperationStatus getSearchBothRange(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
int countInternal() throws DatabaseException
DatabaseException
OperationStatus deleteInternal() throws DatabaseException
DatabaseException
OperationStatus deleteNoNotify() throws DatabaseException
DatabaseException
OperationStatus putInternal(DatabaseEntry key, DatabaseEntry data, PutMode putMode) throws DatabaseException
DatabaseException
OperationStatus putNoNotify(DatabaseEntry key, DatabaseEntry data, PutMode putMode, DatabaseEntry returnOldData) throws DatabaseException
DatabaseException
OperationStatus position(DatabaseEntry key, DatabaseEntry data, LockMode lockMode, boolean first) throws DatabaseException
DatabaseException
OperationStatus search(DatabaseEntry key, DatabaseEntry data, LockMode lockMode, CursorImpl.SearchMode searchMode) throws DatabaseException
DatabaseException
OperationStatus retrieveNext(DatabaseEntry key, DatabaseEntry data, LockMode lockMode, GetMode getMode) throws DatabaseException
DatabaseException
OperationStatus getCurrentInternal(DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException
DatabaseException
boolean advanceCursor(DatabaseEntry key, DatabaseEntry data)
boolean isReadUncommittedMode(LockMode lockMode)
protected void checkUpdatesAllowed(String operation) throws DatabaseException
DatabaseException
void checkState(boolean mustBeInitialized) throws DatabaseException
DatabaseException
void checkEnv() throws RunRecoveryException
RunRecoveryException
- if the underlying environment is invalid.void trace(Level level, String methodName, DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
void trace(Level level, String methodName, LockMode lockMode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |