public final class Crux
extends java.lang.Object
ICruxAPI
.Modifier and Type | Method and Description |
---|---|
static ICruxAPI |
newApiClient(java.lang.String url)
Creates a new remote API client.
|
static ICruxAPI |
newApiClient(java.lang.String url,
RemoteClientOptions options)
Creates a new remote API client.
|
static ICruxAsyncIngestAPI |
newIngestClient(java.util.function.Consumer<NodeConfiguration.Builder> f)
Starts an ingest-only client for transacting into Crux without
running a full local node with index.
|
static ICruxAsyncIngestAPI |
newIngestClient(java.util.Map<?,?> options)
Starts an ingest-only client for transacting into Crux without
running a full local node with index.
|
static ICruxAsyncIngestAPI |
newIngestClient(NodeConfiguration configuration) |
static ICruxAPI |
startNode()
Starts an in-memory query node.
|
static ICruxAPI |
startNode(java.util.function.Consumer<NodeConfiguration.Builder> f)
Starts a Crux node using the provided configuration.
|
static ICruxAPI |
startNode(java.io.File file)
Starts a Crux node using the provided configuration.
|
static ICruxAPI |
startNode(java.util.Map<?,?> options)
Starts a Crux node using the provided configuration.
|
static ICruxAPI |
startNode(NodeConfiguration configuration) |
static ICruxAPI |
startNode(java.net.URL url)
Starts a Crux node using the provided configuration.
|
public static ICruxAPI startNode()
When you're done, close the node with Closeable.close()
public static ICruxAPI startNode(java.util.Map<?,?> options) throws IndexVersionOutOfSyncException
When you're done, close the node with Closeable.close()
options
- a Map of Crux configurationIndexVersionOutOfSyncException
- if the index needs rebuilding.public static ICruxAPI startNode(java.io.File file) throws IndexVersionOutOfSyncException
When you're done, close the node with Closeable.close()
file
- a JSON or EDN file containing Crux configurationIndexVersionOutOfSyncException
- if the index needs rebuilding.public static ICruxAPI startNode(java.net.URL url) throws IndexVersionOutOfSyncException
When you're done, close the node with Closeable.close()
url
- a URL of a JSON or EDN file containing Crux configurationIndexVersionOutOfSyncException
- if the index needs rebuilding.public static ICruxAPI startNode(java.util.function.Consumer<NodeConfiguration.Builder> f) throws IndexVersionOutOfSyncException
ICruxAPI cruxNode = Crux.startNode(n -> { // ... });
When you're done, close the node with Closeable.close()
f
- a callback, provided with an object to configure the node before it starts.IndexVersionOutOfSyncException
- if the index needs rebuilding.public static ICruxAPI startNode(NodeConfiguration configuration) throws IndexVersionOutOfSyncException
IndexVersionOutOfSyncException
public static ICruxAPI newApiClient(java.lang.String url)
NOTE: requires crux-http-client on the classpath.
When you're done, close the node with Closeable.close()
url
- the URL to a Crux HTTP end-point.public static ICruxAPI newApiClient(java.lang.String url, RemoteClientOptions options)
NOTE: requires crux-http-client on the classpath.
When you're done, close the node with Closeable.close()
url
- the URL to a Crux HTTP end-point.options
- options for the remote client.public static ICruxAsyncIngestAPI newIngestClient(java.util.Map<?,?> options)
When you're done, close the node with Closeable.close()
options
- node configuration options.public static ICruxAsyncIngestAPI newIngestClient(java.util.function.Consumer<NodeConfiguration.Builder> f)
ICruxAPI ingestClient = Crux.newIngestClient(n -> { // ... });
When you're done, close the node with Closeable.close()
f
- a callback, provided with an object to configure the node before it starts.public static ICruxAsyncIngestAPI newIngestClient(NodeConfiguration configuration)