Package com.c8db.model
Class StreamTransactionOptions
- java.lang.Object
-
- com.c8db.model.StreamTransactionOptions
-
public class StreamTransactionOptions extends Object
-
-
Constructor Summary
Constructors Constructor Description StreamTransactionOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamTransactionOptionsallowImplicit(Boolean allowImplicit)StreamTransactionOptionsexclusiveCollections(String... exclusive)IntegergetLockTimeout()LonggetMaxTransactionSize()BooleangetWaitForSync()StreamTransactionOptionslockTimeout(Integer lockTimeout)StreamTransactionOptionsmaxTransactionSize(Long maxTransactionSize)StreamTransactionOptionsreadCollections(String... read)StreamTransactionOptionswaitForSync(Boolean waitForSync)StreamTransactionOptionswriteCollections(String... write)
-
-
-
Method Detail
-
getLockTimeout
public Integer getLockTimeout()
-
lockTimeout
public StreamTransactionOptions lockTimeout(Integer lockTimeout)
- Parameters:
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.- Returns:
- options
-
getWaitForSync
public Boolean getWaitForSync()
-
waitForSync
public StreamTransactionOptions waitForSync(Boolean waitForSync)
- Parameters:
waitForSync- an optional boolean flag that, if set, will force the transaction to write all data to disk before returning- Returns:
- options
-
readCollections
public StreamTransactionOptions readCollections(String... read)
- Parameters:
read- contains the array of collection-names to be used in the transaction (mandatory) for read- Returns:
- options
-
writeCollections
public StreamTransactionOptions writeCollections(String... write)
- Parameters:
write- contains the array of collection-names to be used in the transaction (mandatory) for write- Returns:
- options
-
exclusiveCollections
public StreamTransactionOptions exclusiveCollections(String... exclusive)
- Parameters:
exclusive- contains the array of collection-names to be used in the transaction (mandatory) for exclusive write- Returns:
- options
-
allowImplicit
public StreamTransactionOptions allowImplicit(Boolean allowImplicit)
- Parameters:
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.- Returns:
- options
-
getMaxTransactionSize
public Long getMaxTransactionSize()
-
maxTransactionSize
public StreamTransactionOptions maxTransactionSize(Long maxTransactionSize)
- Parameters:
maxTransactionSize- Transaction size limit in bytes. Honored by the RocksDB storage engine only.- Returns:
- options
-
-