Package xtdb.api
Interface IXtdbSubmitClient
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
IXtdb
Provides API access to XTDB transaction submission.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IXtdbSubmitClientStarts an submit-only client for transacting into XTDB without running a full local node with index.static IXtdbSubmitClientnewSubmitClient(Map<?, ?> options) Starts an submit-only client for transacting into XTDB without running a full local node with index.static IXtdbSubmitClientnewSubmitClient(NodeConfiguration configuration) Reads the transaction log.Map<clojure.lang.Keyword,?> Deprecated.submitTx(Transaction transaction) Writes transactions to the log for processing.clojure.lang.IDerefsubmitTxAsync(List<List<?>> txOps) Deprecated.in favour ofsubmitTxAsync(Transaction)submitTxAsync(Transaction txOps) Writes transactions to the log for processing.
-
Method Details
-
newSubmitClient
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
-
submitTx
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.in favour ofsubmitTx(Transaction)Writes transactions to the log for processing.- Parameters:
transaction- the transaction to be processed.- Returns:
- a map with details about the submitted transaction.
-
openTxLog
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
CompletableFuturewith a map with details about the submitted transaction.
-
submitTxAsync
Deprecated.in favour ofsubmitTxAsync(Transaction)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.
-
submitTx(Transaction)