Class StreamTransactionOptions

java.lang.Object
com.arangodb.model.StreamTransactionOptions

public final class StreamTransactionOptions extends Object
Since:
ArangoDB 3.5.0
Author:
Mark Vollmary, Michele Rastelli
  • Constructor Details

    • StreamTransactionOptions

      public StreamTransactionOptions()
  • Method Details

    • getCollections

      public TransactionCollectionOptions getCollections()
    • getLockTimeout

      public Integer getLockTimeout()
    • lockTimeout

      public StreamTransactionOptions 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 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
    • getAllowImplicit

      public Boolean getAllowImplicit()
    • allowImplicit

      public StreamTransactionOptions allowImplicit(Boolean allowImplicit)
      Parameters:
      allowImplicit - Allow reading from undeclared collections.
      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
    • getAllowDirtyRead

      public Boolean getAllowDirtyRead()
    • allowDirtyRead

      public StreamTransactionOptions allowDirtyRead(Boolean allowDirtyRead)
      Parameters:
      allowDirtyRead - Set to true allows reading from followers in an active-failover setup.
      Returns:
      options
      Since:
      ArangoDB 3.4.0
      See Also:
    • getSkipFastLockRound

      public Boolean getSkipFastLockRound()
    • skipFastLockRound

      public StreamTransactionOptions skipFastLockRound(Boolean skipFastLockRound)
      Parameters:
      skipFastLockRound - Whether to disable fast locking for write operations. Skipping the fast lock round can be faster overall if there are many concurrent Stream Transactions queued that all try to lock the same collection exclusively. It avoids deadlocking and retrying which can occur with the fast locking by guaranteeing a deterministic locking order at the expense of each actual locking operation taking longer. Fast locking should not be skipped for read-only Stream Transactions because it degrades performance if there are no concurrent transactions that use exclusive locks on the same collection. Default: false
      Returns:
      options
      Since:
      ArangoDB 3.12.0