public class LockerFactory
extends java.lang.Object
Constructor and Description |
---|
LockerFactory() |
Modifier and Type | Method and Description |
---|---|
static Locker |
getReadableLocker(Environment env,
Database dbHandle,
Locker locker,
boolean retainNonTxnLocks,
boolean readCommittedIsolation)
Get a locker for this database handle for a read or cursor operation.
|
static Locker |
getReadableLocker(Environment env,
Transaction userTxn,
boolean dbIsTransactional,
boolean retainNonTxnLocks,
boolean readCommittedIsolation)
Get a locker for a read or cursor operation.
|
static Locker |
getWritableLocker(Environment env,
Transaction userTxn,
boolean dbIsTransactional,
boolean autoTxnIsReplicated)
Get a locker for a writable operation, checking whether the db and
environment is transactional or not.
|
static Locker |
getWritableLocker(Environment env,
Transaction userTxn,
boolean dbIsTransactional,
boolean retainNonTxnLocks,
boolean autoTxnIsReplicated,
TransactionConfig autoCommitConfig)
Get a locker for a writable operation, also specifying whether to retain
non-transactional locks when a new locker must be created.
|
public static Locker getWritableLocker(Environment env, Transaction userTxn, boolean dbIsTransactional, boolean autoTxnIsReplicated) throws DatabaseException
DatabaseException
public static Locker getWritableLocker(Environment env, Transaction userTxn, boolean dbIsTransactional, boolean retainNonTxnLocks, boolean autoTxnIsReplicated, TransactionConfig autoCommitConfig) throws DatabaseException
retainNonTxnLocks
- is true for DbTree operations, so that the
handle lock may be transferred out of the locker when the operation is
complete.autoTxnIsReplicated
- is true if this transaction is
executed on a rep group master, and needs to be broadcast.
Currently, all application-created transactions are of the type
com.sleepycat.je.txn.Txn, and are replicated if the parent
environment is replicated. Auto Txns are trickier because they may
be created for a local write operation, such as log cleaning.DatabaseException
public static Locker getReadableLocker(Environment env, Transaction userTxn, boolean dbIsTransactional, boolean retainNonTxnLocks, boolean readCommittedIsolation) throws DatabaseException
DatabaseException
public static Locker getReadableLocker(Environment env, Database dbHandle, Locker locker, boolean retainNonTxnLocks, boolean readCommittedIsolation) throws DatabaseException
DatabaseException