|
Berkeley
DB Java Edition version 1.7.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.TransactionConfig
Specifies the attributes of a database environment transaction.
Constructor Summary | |
TransactionConfig()
An instance created using the default constructor is initialized with the system's default settings. |
Method Summary | |
boolean |
getDirtyRead()
Return if the transaction is configured to perform dirty reads. |
boolean |
getNoSync()
Return if the transaction is configured to not write or synchronously flush the log it when commits. |
boolean |
getNoWait()
Return if the transaction is configured to not wait if a lock request cannot be immediately granted. |
boolean |
getSerializableIsolation()
Return if the transaction has been explicitly configured to have Serializable (Degree 3) isolation. |
boolean |
getSync()
Return if the transaction is configured to not write or synchronously flush the log it when commits. |
boolean |
getWriteNoSync()
Return if the transaction is configured to write but not synchronously flush the log it when commits. |
void |
setDirtyRead(boolean dirtyRead)
Configure the transaction to perform dirty reads. |
void |
setNoSync(boolean txnNoSync)
Configure the transaction to not write or synchronously flush the log it when commits. |
void |
setNoWait(boolean noWait)
Configure the transaction to not wait if a lock request cannot be immediately granted. |
void |
setSerializableIsolation(boolean serializableIsolation)
Configure this transaction to have Serializable (Degree 3) isolation. |
void |
setSync(boolean txnSync)
Configure the transaction to write or synchronously flush the log it when commits. |
void |
setWriteNoSync(boolean txnWriteNoSync)
Configure the transaction to write but not synchronously flush the log it when commits. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransactionConfig()
Method Detail |
public void setSerializableIsolation(boolean serializableIsolation)
By default a transaction provides Repeatable Read isolation; EnvironmentConfig.setTxnSerializableIsolation(boolean)
may be called to override the default. If the environment is configured
for Serializable isolation, all transactions will be Serializable
regardless of whether this method is called; calling setSerializableIsolation(boolean)
with a false parameter will not disable Serializable isolation.
The default is false for this class and the database environment.
public boolean getSerializableIsolation()
public void setSync(boolean txnSync)
This behavior may be set for a database environment using the Environment.setMutableConfig method. Any value specified to this method overrides that setting.
The default is false for this class and true for the database environment.
If true is passed to both setSync and setNoSync, setSync will take precedence.
txnSync
- If true, transactions exhibit all the
ACID (atomicity, consistency, isolation, and durability) properties.
public boolean getSync()
public void setWriteNoSync(boolean txnWriteNoSync)
This behavior may be set for a database environment using the Environment.setMutableConfig method. Any value specified to this method overrides that setting.
The default is false for this class and the database environment.
txnWriteNoSync
- If true, transactions exhibit
the ACI (atomicity, consistency, and isolation) properties, but not D
(durability); that is, database integrity will be maintained, but if
the operating system fails, it is possible some number of the most
recently committed transactions may be undone during recovery. The
number of transactions at risk is governed by how often the operating
system flushes dirty buffers to disk, and how often the log is
checkpointed.
public boolean getWriteNoSync()
public void setNoSync(boolean txnNoSync)
This behavior may be set for a database environment using the Environment.setMutableConfig method. Any value specified to this method overrides that setting.
The default is false for this class and the database environment.
txnNoSync
- If true, transactions exhibit the
ACI (atomicity, consistency, and isolation) properties, but not D
(durability); that is, database integrity will be maintained, but if
the application or system fails, it is possible some number of the
most recently committed transactions may be undone during recovery.
The number of transactions at risk is governed by how many log updates
can fit into the log buffer, how often the operating system flushes
dirty buffers to disk, and how often the log is checkpointed.
public boolean getNoSync()
public void setNoWait(boolean noWait)
The default is false for this class and the database environment.
noWait
- If true, transactions will not wait if
a lock request cannot be immediately granted, instead DeadlockException
will be thrown.
public boolean getNoWait()
public void setDirtyRead(boolean dirtyRead)
The default is false for this class and the database environment.
dirtyRead
- If true, all read operations
performed by the transaction may read modified but not yet committed
data.
public boolean getDirtyRead()
|
Berkeley
DB Java Edition version 1.7.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |