Package com.c8db.model
Class C8TransactionOptions
- java.lang.Object
-
- com.c8db.model.C8TransactionOptions
-
public class C8TransactionOptions extends Object
- See Also:
- API Documentation
-
-
Constructor Summary
Constructors Constructor Description C8TransactionOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected C8TransactionOptionsaction(String action)C8TransactionOptionsallowImplicit(Boolean allowImplicit)C8TransactionOptionsexclusiveCollections(String... exclusive)protected StringgetAction()IntegergetLockTimeout()ObjectgetParams()BooleangetWaitForSync()C8TransactionOptionslockTimeout(Integer lockTimeout)C8TransactionOptionsparams(Object params)C8TransactionOptionsreadCollections(String... read)C8TransactionOptionswaitForSync(Boolean waitForSync)C8TransactionOptionswriteCollections(String... write)
-
-
-
Method Detail
-
getAction
protected String getAction()
-
action
protected C8TransactionOptions action(String action)
- Parameters:
action- the actual transaction operations to be executed, in the form of stringified JavaScript code- Returns:
- options
-
getParams
public Object getParams()
-
params
public C8TransactionOptions params(Object params)
- Parameters:
params- optional arguments passed to action- Returns:
- options
-
getLockTimeout
public Integer getLockTimeout()
-
lockTimeout
public C8TransactionOptions 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 C8TransactionOptions 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 C8TransactionOptions readCollections(String... read)
- Parameters:
read- contains the array of collection-names to be used in the transaction (mandatory) for read- Returns:
- options
-
writeCollections
public C8TransactionOptions writeCollections(String... write)
- Parameters:
write- contains the array of collection-names to be used in the transaction (mandatory) for write- Returns:
- options
-
exclusiveCollections
public C8TransactionOptions exclusiveCollections(String... exclusive)
- Parameters:
exclusive- contains the array of collection-names to be used in the transaction (mandatory) for exclusive write- Returns:
- options
- Since:
- ArangoDB 3.4.0
-
allowImplicit
public C8TransactionOptions 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
-
-