Class CursorConfig
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CursorConfigA convenience instance to specify the database cursor will be used to make bulk changes to the underlying database.static final CursorConfigDefault configuration used if null is passed to methods that create a cursor.static final CursorConfigDeprecated.static final CursorConfigDeprecated.This has been replaced byREAD_UNCOMMITTEDto conform to ANSI database isolation terminology.static final CursorConfigA convenience instance to configure a cursor for read committed isolation.static final CursorConfigA convenience instance to configure read operations performed by the cursor to return modified but not yet committed data.static final CursorConfigA convenience instance to configure read operations performed by the cursor to return values as they were when the cursor was opened, ifDatabaseConfig.setMultiversion(boolean)is configured.static final CursorConfigA convenience instance to specify the Concurrent Data Store environment cursor will be used to update the database. -
Constructor Summary
ConstructorsConstructorDescriptionAn instance created using the default constructor is initialized with the system's default settings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn if the cursor will be used to do bulk operations on the underlying database.booleanDeprecated.This has been replaced bygetReadCommitted()to conform to ANSI database isolation terminology.booleanDeprecated.This has been replaced bygetReadUncommitted()to conform to ANSI database isolation terminology.booleanReturn if the cursor is configured for read committed isolation.booleanReturn if read operations performed by the cursor are configured to return modified but not yet committed data.booleanReturn if read operations performed by the cursor are configured to return data as it was when the cursor was opened, without locking.booleanReturn if the Concurrent Data Store environment cursor will be used to update the database.voidsetBulkCursor(boolean bulkCursor) Specify that the cursor will be used to do bulk operations on the underlying database.voidsetDegree2(boolean degree2) Deprecated.This has been replaced bysetReadCommitted(boolean)to conform to ANSI database isolation terminology.voidsetDirtyRead(boolean dirtyRead) Deprecated.This has been replaced bysetReadUncommitted(boolean)to conform to ANSI database isolation terminology.voidsetReadCommitted(boolean readCommitted) Configure the cursor for read committed isolation.voidsetReadUncommitted(boolean readUncommitted) Configure read operations performed by the cursor to return modified but not yet committed data.voidsetSnapshot(boolean snapshot) Configure read operations performed by the cursor to return data as it was when the cursor opened without locking, ifDatabaseConfig.setMultiversion(boolean)was configured.voidsetWriteCursor(boolean writeCursor) Specify the Concurrent Data Store environment cursor will be used to update the database.
-
Field Details
-
DEFAULT
Default configuration used if null is passed to methods that create a cursor. -
BULK_CURSOR
A convenience instance to specify the database cursor will be used to make bulk changes to the underlying database. -
READ_COMMITTED
A convenience instance to configure a cursor for read committed isolation.This ensures the stability of the current data item read by the cursor but permits data read by this cursor to be modified or deleted prior to the commit of the transaction.
-
READ_UNCOMMITTED
A convenience instance to configure read operations performed by the cursor to return modified but not yet committed data. -
SNAPSHOT
A convenience instance to configure read operations performed by the cursor to return values as they were when the cursor was opened, ifDatabaseConfig.setMultiversion(boolean)is configured. -
WRITECURSOR
A convenience instance to specify the Concurrent Data Store environment cursor will be used to update the database.The underlying Berkeley DB database environment must have been configured as a Concurrent Data Store environment.
-
DIRTY_READ
Deprecated.This has been replaced byREAD_UNCOMMITTEDto conform to ANSI database isolation terminology.A convenience instance to configure read operations performed by the cursor to return modified but not yet committed data. -
DEGREE_2
Deprecated.This has been replaced byREAD_COMMITTEDto conform to ANSI database isolation terminology.A convenience instance to configure a cursor for read committed isolation.This ensures the stability of the current data item read by the cursor but permits data read by this cursor to be modified or deleted prior to the commit of the transaction.
-
-
Constructor Details
-
CursorConfig
public CursorConfig()An instance created using the default constructor is initialized with the system's default settings.
-
-
Method Details
-
setBulkCursor
public void setBulkCursor(boolean bulkCursor) Specify that the cursor will be used to do bulk operations on the underlying database.- Parameters:
bulkCursor- If true, specify the cursor will be used to do bulk operations on the underlying database.
-
getBulkCursor
public boolean getBulkCursor()Return if the cursor will be used to do bulk operations on the underlying database.- Returns:
- If the cursor will be used to do bulk operations on the underlying database.
-
setReadCommitted
public void setReadCommitted(boolean readCommitted) Configure the cursor for read committed isolation.This ensures the stability of the current data item read by the cursor but permits data read by this cursor to be modified or deleted prior to the commit of the transaction.
- Parameters:
readCommitted- If true, configure the cursor for read committed isolation.
-
getReadCommitted
public boolean getReadCommitted()Return if the cursor is configured for read committed isolation.- Returns:
- If the cursor is configured for read committed isolation.
-
setDegree2
public void setDegree2(boolean degree2) Deprecated.This has been replaced bysetReadCommitted(boolean)to conform to ANSI database isolation terminology.Configure the cursor for read committed isolation.This ensures the stability of the current data item read by the cursor but permits data read by this cursor to be modified or deleted prior to the commit of the transaction.
- Parameters:
degree2- If true, configure the cursor for read committed isolation.
-
getDegree2
public boolean getDegree2()Deprecated.This has been replaced bygetReadCommitted()to conform to ANSI database isolation terminology.Return if the cursor is configured for read committed isolation.- Returns:
- If the cursor is configured for read committed isolation.
-
setReadUncommitted
public void setReadUncommitted(boolean readUncommitted) Configure read operations performed by the cursor to return modified but not yet committed data.- Parameters:
readUncommitted- If true, configure read operations performed by the cursor to return modified but not yet committed data.
-
getReadUncommitted
public boolean getReadUncommitted()Return if read operations performed by the cursor are configured to return modified but not yet committed data.- Returns:
- If read operations performed by the cursor are configured to return modified but not yet committed data.
-
setDirtyRead
public void setDirtyRead(boolean dirtyRead) Deprecated.This has been replaced bysetReadUncommitted(boolean)to conform to ANSI database isolation terminology.Configure read operations performed by the cursor to return modified but not yet committed data.- Parameters:
dirtyRead- If true, configure read operations performed by the cursor to return modified but not yet committed data.
-
getDirtyRead
public boolean getDirtyRead()Deprecated.This has been replaced bygetReadUncommitted()to conform to ANSI database isolation terminology.Return if read operations performed by the cursor are configured to return modified but not yet committed data.- Returns:
- If read operations performed by the cursor are configured to return modified but not yet committed data.
-
setSnapshot
public void setSnapshot(boolean snapshot) Configure read operations performed by the cursor to return data as it was when the cursor opened without locking, ifDatabaseConfig.setMultiversion(boolean)was configured.- Parameters:
snapshot- If true, configure read operations performed by the cursor to return data as it was when the cursor was opened, without locking.
-
getSnapshot
public boolean getSnapshot()Return if read operations performed by the cursor are configured to return data as it was when the cursor was opened, without locking.- Returns:
- If read operations performed by the cursor are configured to return data as it was when the cursor was opened.
-
setWriteCursor
public void setWriteCursor(boolean writeCursor) Specify the Concurrent Data Store environment cursor will be used to update the database.- Parameters:
writeCursor- If true, specify the Concurrent Data Store environment cursor will be used to update the database.
-
getWriteCursor
public boolean getWriteCursor()Return if the Concurrent Data Store environment cursor will be used to update the database.- Returns:
- If the Concurrent Data Store environment cursor will be used to update the database.
-
READ_COMMITTEDto conform to ANSI database isolation terminology.