Package xtdb.api

Interface IXtdbSubmitClient

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
IXtdb

public interface IXtdbSubmitClient extends Closeable
Provides API access to XTDB transaction submission.
  • Method Details

    • newSubmitClient

      static IXtdbSubmitClient newSubmitClient(Map<?,?> options)
      Starts an submit-only client for transacting into XTDB without running a full local node with index.

      When you're done, close the node with Closeable.close()

      Parameters:
      options - node configuration options.
      Returns:
      the started submit client node.
      See Also:
    • newSubmitClient

      Starts an submit-only client for transacting into XTDB without running a full local node with index.

       IXtdbSubmitClient submitClient = IXtdbSubmitClient.newSubmitClient(n -> {
         // ...
       });
       

      When you're done, close the close with Closeable.close()

      Parameters:
      f - a callback, provided with an object to configure the node before it starts.
      Returns:
      the started submit client node.
      See Also:
    • newSubmitClient

      static IXtdbSubmitClient newSubmitClient(NodeConfiguration configuration)
    • submitTx

      TransactionInstant submitTx(Transaction transaction)
      Writes transactions to the log for processing.
      Parameters:
      transaction - the transaction to be processed.
      Returns:
      a map with details about the submitted transaction.
    • submitTx

      @Deprecated Map<clojure.lang.Keyword,?> submitTx(List<List<?>> transaction)
      Deprecated.
      Writes transactions to the log for processing.
      Parameters:
      transaction - the transaction to be processed.
      Returns:
      a map with details about the submitted transaction.
    • openTxLog

      ICursor<Map<clojure.lang.Keyword,?>> openTxLog(Long afterTxId, boolean withOps)
      Reads the transaction log. Optionally includes operations, which allow the contents under the ::xt/tx-ops key to be piped into (submit-tx tx-ops) of another XTDB instance.
      Parameters:
      afterTxId - optional transaction id to start after.
      withOps - should the operations with documents be included?
      Returns:
      a lazy sequence of the transaction log.
    • submitTxAsync

      Writes transactions to the log for processing. Non-blocking.
      Parameters:
      txOps - the transactions to be processed.
      Returns:
      a CompletableFuture with a map with details about the submitted transaction.
    • submitTxAsync

      @Deprecated clojure.lang.IDeref submitTxAsync(List<List<?>> txOps)
      Deprecated.
      Writes transactions to the log for processing. Non-blocking.
      Parameters:
      txOps - the transactions to be processed.
      Returns:
      a deref with a map with details about the submitted transaction.