public class SCursorConfig
extends java.lang.Object
For a user created instance, no attribute is set by default. In addition, calling the getter method of an unset attribute results in an IllegalStateException. To set an attribute, call the setter method of the attribute.
When used to create a cursor, system default values are used for unset attributes.
Modifier and Type | Field and Description |
---|---|
static SCursorConfig |
DEFAULT
Default configuration used if null is passed to methods that create a
cursor.
|
static SCursorConfig |
READ_COMMITTED
A convenience instance to configure a cursor for read committed
isolation.
|
static SCursorConfig |
READ_UNCOMMITTED
A convenience instance to configure read operations performed by the
cursor to return modified but not yet committed data.
|
static SCursorConfig |
SNAPSHOT
A convenience instance to configure read operations performed by the
cursor to return values as they were when the cursor was opened, if
SDatabaseConfig.setMultiversion(boolean) is configured. |
Constructor and Description |
---|
SCursorConfig()
Create an empty SCursorConfig with no attribute set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getBulkCursor()
Return if the cursor will be used to do bulk operations on the
underlying database.
|
protected java.lang.Object |
getField(F field)
Return the value set on a specified field.
|
boolean |
getReadCommitted()
Return if the cursor is configured for read committed isolation.
|
boolean |
getReadUncommitted()
Return if read operations performed by the cursor are configured to
return modified but not yet committed data.
|
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.
|
protected T |
getThriftObj() |
SCursorConfig |
setBulkCursor(boolean bulkCursor)
Specify that the cursor will be used to do bulk operations on the
underlying database.
|
SCursorConfig |
setReadCommitted(boolean readCommitted)
Configure the cursor for read committed isolation.
|
SCursorConfig |
setReadUncommitted(boolean readUncommitted)
Configure read operations performed by the cursor to return modified but
not yet committed data.
|
SCursorConfig |
setSnapshot(boolean snapshot)
Configure read operations performed by the cursor to return data as it
was when the cursor opened without locking, if
SDatabaseConfig.setMultiversion(boolean) was configured. |
public static final SCursorConfig DEFAULT
public static final SCursorConfig READ_COMMITTED
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.
public static final SCursorConfig READ_UNCOMMITTED
public static final SCursorConfig SNAPSHOT
SDatabaseConfig.setMultiversion(boolean)
is configured.public SCursorConfig()
public boolean getBulkCursor()
public SCursorConfig setBulkCursor(boolean bulkCursor)
bulkCursor
- if true, specify the cursor will be used to do bulk
operations on the underlying databasepublic boolean getReadCommitted()
public SCursorConfig setReadCommitted(boolean readCommitted)
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.
readCommitted
- if true, configure the cursor for read committed
isolationpublic boolean getReadUncommitted()
public SCursorConfig setReadUncommitted(boolean readUncommitted)
readUncommitted
- if true, configure read operations performed by
the cursor to return modified but not yet committed datapublic boolean getSnapshot()
public SCursorConfig setSnapshot(boolean snapshot)
SDatabaseConfig.setMultiversion(boolean)
was configured.snapshot
- if true, configure read operations performed by the
cursor to return data as it was when the cursor was opened, without
lockingprotected T getThriftObj()
protected java.lang.Object getField(F field) throws java.lang.IllegalStateException
field
- the fieldjava.lang.IllegalStateException
- if the field is not setCopyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved.