Class TransactionOptions


  • public final class TransactionOptions
    extends Object
    Author:
    Mark Vollmary, Michele Rastelli
    See Also:
    API Documentation
    • Constructor Detail

      • TransactionOptions

        public TransactionOptions()
    • Method Detail

      • getAction

        public String getAction()
      • getParams

        public Object getParams()
      • params

        public TransactionOptions params​(Object params)
        Parameters:
        params - optional arguments passed to action
        Returns:
        options
      • getLockTimeout

        public Integer getLockTimeout()
      • lockTimeout

        public TransactionOptions lockTimeout​(Integer lockTimeout)
        Parameters:
        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.
        Returns:
        options
      • getWaitForSync

        public Boolean getWaitForSync()
      • waitForSync

        public TransactionOptions 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 TransactionOptions readCollections​(String... read)
        Parameters:
        read - contains the array of collection-names to be used in the transaction (mandatory) for read
        Returns:
        options
      • writeCollections

        public TransactionOptions writeCollections​(String... write)
        Parameters:
        write - contains the array of collection-names to be used in the transaction (mandatory) for write
        Returns:
        options
      • exclusiveCollections

        public TransactionOptions 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 TransactionOptions 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 TransactionOptions maxTransactionSize​(Long maxTransactionSize)
        Parameters:
        maxTransactionSize - Transaction size limit in bytes. Honored by the RocksDB storage engine only.
        Returns:
        options
        Since:
        ArangoDB 3.2.0