public class TransactionOptions extends Object
Transaction.| Constructor and Description |
|---|
TransactionOptions(OptionConsumer consumer) |
| Modifier and Type | Method and Description |
|---|---|
OptionConsumer |
getOptionConsumer()
Returns the object on which these options are being set.
|
void |
setAccessSystemKeys()
Allows this transaction to read and modify system keys (those that start with the byte 0xFF).
|
void |
setCausalReadDisable() |
void |
setCausalReadRisky()
The read version will be committed, and usually will be the latest committed, but might not be the latest committed in the event of a fault or partition.
|
void |
setCausalWriteRisky()
The transaction, if not self-conflicting, may be committed a second time after commit succeeds, in the event of a fault.
|
void |
setCheckWritesEnable() |
void |
setDebugDump() |
void |
setDebugRetryLogging(String value) |
void |
setDurabilityDatacenter() |
void |
setDurabilityDevNullIsWebScale() |
void |
setDurabilityRisky() |
void |
setInitializeNewDatabase()
This is a write-only transaction which sets the initial configuration.
|
void |
setMaxRetryDelay(long value)
Set the maximum amount of backoff delay incurred in the call to onError if the error is retryable.
|
void |
setNextWriteNoWriteConflictRange()
The next write performed on this transaction will not generate a write conflict range.
|
void |
setPriorityBatch()
Specifies that this transaction should be treated as low priority and that default priority transactions should be processed first.
|
void |
setPrioritySystemImmediate()
Specifies that this transaction should be treated as highest priority and that lower priority transactions should block behind this one.
|
void |
setReadAheadDisable()
Disables read-ahead caching for range reads.
|
void |
setReadSystemKeys()
Allows this transaction to read system keys (those that start with the byte 0xFF).
|
void |
setReadYourWritesDisable()
Reads performed by a transaction will not see any prior mutations that occured in that transaction, instead seeing the value which was in the database at the transaction's read version.
|
void |
setRetryLimit(long value)
Set a maximum number of retries after which additional calls to onError will throw the most recently seen error code.
|
void |
setSnapshotRywDisable()
Snapshot read operations will not see the results of writes done in the same transaction.
|
void |
setSnapshotRywEnable()
Snapshot read operations will see the results of writes done in the same transaction.
|
void |
setTimeout(long value)
Set a timeout in milliseconds which, when elapsed, will cause the transaction automatically to be cancelled.
|
public TransactionOptions(OptionConsumer consumer)
public void setCausalWriteRisky()
public void setCausalReadRisky()
public void setNextWriteNoWriteConflictRange()
public void setReadYourWritesDisable()
public void setReadAheadDisable()
public void setPrioritySystemImmediate()
public void setPriorityBatch()
public void setInitializeNewDatabase()
public void setAccessSystemKeys()
public void setReadSystemKeys()
public void setTimeout(long value)
[0, INT_MAX]. If set to 0, will disable all timeouts. All pending and any future uses of the transaction will throw an exception. The transaction can be used again after it is reset. Like all transaction options, a timeout must be reset after a call to onError. This behavior allows the user to make the timeout dynamic.value - value in milliseconds of timeoutpublic void setRetryLimit(long value)
[-1, INT_MAX]. If set to -1, will disable the retry limit. Like all transaction options, the retry limit must be reset after a call to onError. This behavior allows the user to make the retry limit dynamic.value - number of times to retrypublic void setMaxRetryDelay(long value)
[0, INT_MAX]. Like all transaction options, the maximum retry delay must be reset after a call to onError. If the maximum retry delay is less than the current retry delay of the transaction, then the current retry delay will be clamped to the maximum retry delay.value - value in milliseconds of maximum delaypublic void setSnapshotRywEnable()
public void setSnapshotRywDisable()
public void setCausalReadDisable()
public void setCheckWritesEnable()
public void setDurabilityDatacenter()
public void setDurabilityRisky()
public void setDurabilityDevNullIsWebScale()
public void setDebugDump()
public void setDebugRetryLogging(String value)
public OptionConsumer getOptionConsumer()