public class TransactionOptions extends Object
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() |
Integer |
getLockTimeout() |
Long |
getMaxTransactionSize() |
Object |
getParams() |
Boolean |
getWaitForSync() |
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
- a numeric value that can be used to set a timeout in seconds for
waiting on collection locks. This option is only meaningful when using
exclusive locks. If not specified, a default value of 900 seconds 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.Copyright © 2016–2022 ArangoDB GmbH. All rights reserved.