public class TransactionOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TransactionOptions.TransactionCollectionOptions |
Constructor and Description |
---|
TransactionOptions() |
Modifier and Type | Method and Description |
---|---|
protected TransactionOptions |
action(String action) |
TransactionOptions |
allowImplicit(Boolean allowImplicit) |
TransactionOptions |
exclusiveCollections(String... exclusive) |
protected String |
getAction() |
Long |
getIntermediateCommitCount() |
Long |
getIntermediateCommitSize() |
Integer |
getLockTimeout() |
Long |
getMaxTransactionSize() |
Object |
getParams() |
Boolean |
getWaitForSync() |
TransactionOptions |
intermediateCommitCount(Long intermediateCommitCount) |
TransactionOptions |
intermediateCommitSize(Long intermediateCommitSize) |
TransactionOptions |
lockTimeout(Integer lockTimeout) |
TransactionOptions |
maxTransactionSize(Long maxTransactionSize) |
TransactionOptions |
params(Object params) |
TransactionOptions |
readCollections(String... read) |
TransactionOptions |
waitForSync(Boolean waitForSync) |
TransactionOptions |
writeCollections(String... write) |
protected String getAction()
protected TransactionOptions action(String action)
action
- the actual transaction operations to be executed, in the form of stringified JavaScript codepublic Object getParams()
public TransactionOptions params(Object params)
params
- optional arguments passed to actionpublic Integer getLockTimeout()
public TransactionOptions lockTimeout(Integer lockTimeout)
lockTimeout
- an optional numeric value that can be used to set a timeout for waiting on collection locks. If not
specified, a default value will be used. Setting lockTimeout to 0 will make ArangoDB not time out
waiting for a lock.public Boolean getWaitForSync()
public TransactionOptions waitForSync(Boolean waitForSync)
waitForSync
- an optional boolean flag that, if set, will force the transaction to write all data to disk before
returningpublic TransactionOptions readCollections(String... read)
read
- contains the array of collection-names to be used in the transaction (mandatory) for readpublic TransactionOptions writeCollections(String... write)
write
- contains the array of collection-names to be used in the transaction (mandatory) for writepublic TransactionOptions exclusiveCollections(String... exclusive)
exclusive
- contains the array of collection-names to be used in the transaction (mandatory) for exclusive writepublic TransactionOptions allowImplicit(Boolean allowImplicit)
allowImplicit
- Collections that will be written to in the transaction must be declared with the write attribute or it
will fail, whereas non-declared collections from which is solely read will be added lazily. The
optional attribute allowImplicit can be set to false to let transactions fail in case of undeclared
collections for reading. Collections for reading should be fully declared if possible, to avoid
deadlocks.public Long getMaxTransactionSize()
public TransactionOptions maxTransactionSize(Long maxTransactionSize)
maxTransactionSize
- Transaction size limit in bytes. Honored by the RocksDB storage engine only.public Long getIntermediateCommitCount()
public TransactionOptions intermediateCommitCount(Long intermediateCommitCount)
intermediateCommitCount
- Maximum number of operations after which an intermediate commit is performed automatically. Honored by
the RocksDB storage engine only.public Long getIntermediateCommitSize()
public TransactionOptions intermediateCommitSize(Long intermediateCommitSize)
intermediateCommitSize
- Maximum total size of operations after which an intermediate commit is performed automatically.
Honored by the RocksDB storage engine only.Copyright © 2016–2019 ArangoDB GmbH. All rights reserved.