public class TransactionOptions extends RocksObject
nativeHandle_owningHandle_| Constructor and Description |
|---|
TransactionOptions() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
disposeInternal(long handle) |
long |
getDeadlockDetectDepth()
Gets the number of traversals to make during deadlock detection.
|
long |
getExpiration()
Expiration duration in milliseconds.
|
long |
getLockTimeout()
The wait timeout in milliseconds when a transaction attempts to lock a key.
|
long |
getMaxWriteBatchSize()
Get the maximum number of bytes that may be used for the write batch.
|
boolean |
isDeadlockDetect()
True means that before acquiring locks, this transaction will
check if doing so will cause a deadlock.
|
boolean |
isSetSnapshot()
True indicates snapshots will be set, just like if
Transaction.setSnapshot() had been called |
TransactionOptions |
setDeadlockDetect(boolean deadlockDetect)
Setting to true means that before acquiring locks, this transaction will
check if doing so will cause a deadlock.
|
TransactionOptions |
setDeadlockDetectDepth(long deadlockDetectDepth)
Sets the number of traversals to make during deadlock detection.
|
TransactionOptions |
setExpiration(long expiration)
Expiration duration in milliseconds.
|
TransactionOptions |
setLockTimeout(long lockTimeout)
If positive, specifies the wait timeout in milliseconds when
a transaction attempts to lock a key.
|
TransactionOptions |
setMaxWriteBatchSize(long maxWriteBatchSize)
Set the maximum number of bytes that may be used for the write batch.
|
TransactionOptions |
setSetSnapshot(boolean setSnapshot)
Setting the setSnapshot to true is the same as calling
Transaction.setSnapshot(). |
disposeInternal, getNativeHandleclose, disOwnNativeHandle, isOwningHandleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic boolean isSetSnapshot()
Transaction.setSnapshot() had been calledpublic TransactionOptions setSetSnapshot(boolean setSnapshot)
Transaction.setSnapshot().
Default: falsesetSnapshot - Whether to set a snapshotpublic boolean isDeadlockDetect()
Status.Code.Busy. The user should retry their transaction.public TransactionOptions setDeadlockDetect(boolean deadlockDetect)
Status.Code.Busy. The user should retry their transaction.deadlockDetect - true if we should detect deadlocks.public long getLockTimeout()
TransactionDBOptions.getTransactionLockTimeout(long)
will be usedpublic TransactionOptions setLockTimeout(long lockTimeout)
TransactionDBOptions.getTransactionLockTimeout(long)
will be used
Default: -1lockTimeout - the lock timeout in millisecondspublic long getExpiration()
public TransactionOptions setExpiration(long expiration)
expiration - the expiration duration in millisecondspublic long getDeadlockDetectDepth()
public TransactionOptions setDeadlockDetectDepth(long deadlockDetectDepth)
deadlockDetectDepth - the number of traversals to make during
deadlock detectionpublic long getMaxWriteBatchSize()
public TransactionOptions setMaxWriteBatchSize(long maxWriteBatchSize)
maxWriteBatchSize - the maximum number of bytes, 0 means no limit.protected final void disposeInternal(long handle)
disposeInternal in class RocksObjectCopyright © 2022. All rights reserved.