public interface AerospikeClient
extends java.lang.AutoCloseable
AerospikeClient interface provides an abstraction on top of aerospike's client
for integrating its asynchronous commands in Vert.x-based Applications.| Modifier and Type | Method and Description |
|---|---|
AerospikeClient |
add(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
com.aerospike.client.Bin[] bins,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler)
Asynchronously add integer/double bin values to existing record bin values.
|
AerospikeClient |
append(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
com.aerospike.client.Bin[] bins,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler)
Asynchronously append bin string values to existing record bin values.
|
void |
close()
Close all client connections to database server nodes.
|
static AerospikeClient |
create(io.vertx.core.Vertx vertx)
Like
create(Vertx, AerospikeConnectOptions) with default options. |
static AerospikeClient |
create(io.vertx.core.Vertx vertx,
AerospikeConnectOptions connectOptions)
Create a shared aerospike client using the given connect options.
|
static AerospikeClient |
createNonShared(io.vertx.core.Vertx vertx)
Like
createNonShared(Vertx, AerospikeConnectOptions) with default options. |
static AerospikeClient |
createNonShared(io.vertx.core.Vertx vertx,
AerospikeConnectOptions connectOptions)
Create a non shared aerospike client using the given connect options.
|
AerospikeClient |
delete(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> handler)
Asynchronously delete record for specified key.
|
AerospikeClient |
execute(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
java.lang.String packageName,
java.lang.String functionName,
com.aerospike.client.Value[] functionArgs,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> handler)
Asynchronously execute user defined function on server.
|
AerospikeClient |
exists(com.aerospike.client.policy.BatchPolicy batchPolicy,
com.aerospike.client.Key[] keys,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.lang.Boolean>>> handler)
Asynchronously check if multiple record keys exist in one batch call.
|
AerospikeClient |
exists(com.aerospike.client.policy.Policy policy,
com.aerospike.client.Key key,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> handler)
Asynchronously determine if a record key exists.
|
AerospikeClient |
get(com.aerospike.client.policy.BatchPolicy batchPolicy,
com.aerospike.client.Key[] keys,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.Record>>> handler)
Asynchronously read multiple records for specified keys in one batch call.
|
AerospikeClient |
get(com.aerospike.client.policy.BatchPolicy batchPolicy,
com.aerospike.client.Key[] keys,
java.lang.String[] binNames,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.Record>>> handler)
Asynchronously read multiple record headers and bins for specified keys in one batch call.
|
AerospikeClient |
get(com.aerospike.client.policy.BatchPolicy batchPolicy,
java.util.List<com.aerospike.client.BatchRead> records,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.BatchRead>>> handler)
Asynchronously read multiple records for specified batch keys in one batch call.
|
AerospikeClient |
get(com.aerospike.client.policy.Policy policy,
com.aerospike.client.Key key,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler)
Asynchronously read entire record for specified key.
|
AerospikeClient |
get(com.aerospike.client.policy.Policy policy,
com.aerospike.client.Key key,
java.lang.String[] binNames,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler)
Asynchronously read record header and bins for specified key.
|
com.aerospike.client.AerospikeClient |
getAerospikeClient()
Get the underlying
AerospikeClient |
AerospikeClient |
getClusterStats(io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.cluster.ClusterStats>> handler)
Return operating cluster statistics.
|
AerospikeClient |
getHeader(com.aerospike.client.policy.BatchPolicy batchPolicy,
com.aerospike.client.Key[] keys,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.Record>>> handler)
Asynchronously read multiple record header data for specified keys in one batch call.
|
AerospikeClient |
getHeader(com.aerospike.client.policy.Policy policy,
com.aerospike.client.Key key,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler)
Asynchronously read record generation and expiration only for specified key.
|
AerospikeClient |
isConnected(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> handler)
Determine if we are ready to talk to the database server cluster.
|
AerospikeClient |
operate(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
com.aerospike.client.Operation[] operations,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler)
Asynchronously perform multiple read/write operations on a single key in one batch call.
|
AerospikeClient |
prepend(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
com.aerospike.client.Bin[] bins,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler)
Asynchronously prepend bin string values to existing record bin values.
|
AerospikeClient |
put(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
com.aerospike.client.Bin[] bins,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler)
Asynchronously write record bin(s).
|
AerospikeClient |
query(com.aerospike.client.policy.QueryPolicy queryPolicy,
com.aerospike.client.query.Statement statement,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.query.KeyRecord>>> handler)
Asynchronously execute query on all server nodes.
|
AerospikeClient |
scanAll(com.aerospike.client.policy.ScanPolicy policy,
java.lang.String namespace,
java.lang.String setName,
java.lang.String[] binNames,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.query.KeyRecord>>> handler)
Asynchronously read all records in specified namespace and set
|
AerospikeClient |
scanPartitions(com.aerospike.client.policy.ScanPolicy policy,
com.aerospike.client.query.PartitionFilter partitionFilter,
java.lang.String namespace,
java.lang.String setName,
java.lang.String[] binNames,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.query.KeyRecord>>> handler)
Asynchronously read records in specified namespace, set and partition filter.
|
AerospikeClient |
touch(com.aerospike.client.policy.WritePolicy writePolicy,
com.aerospike.client.Key key,
io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler)
Asynchronously reset record's time to expiration using the policy's expiration.
|
static AerospikeClient create(io.vertx.core.Vertx vertx, AerospikeConnectOptions connectOptions)
vertx - the vertx instanceconnectOptions - user provided connection optionsstatic AerospikeClient create(io.vertx.core.Vertx vertx)
create(Vertx, AerospikeConnectOptions) with default options.vertx - the vertx instancestatic AerospikeClient createNonShared(io.vertx.core.Vertx vertx, AerospikeConnectOptions connectOptions)
vertx - the vertx instanceconnectOptions - user provided connection optionsstatic AerospikeClient createNonShared(io.vertx.core.Vertx vertx)
createNonShared(Vertx, AerospikeConnectOptions) with default options.vertx - the vertx instanceAerospikeClient isConnected(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> handler)
handler - the handler that will handle responseAerospikeClient.isConnected()AerospikeClient getClusterStats(io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.cluster.ClusterStats>> handler)
handler - the handler that will handle the received cluster statisticsAerospikeClient.getClusterStats()void close()
close in interface java.lang.AutoCloseableAerospikeClient.close()com.aerospike.client.AerospikeClient getAerospikeClient()
AerospikeClientcom.aerospike.client.AerospikeClient instance which is used internally.AerospikeClient put(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, com.aerospike.client.Bin[] bins, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierbins - array of bin name/value pairshandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.put(EventLoop, WriteListener, WritePolicy, Key, Bin...)AerospikeClient append(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, com.aerospike.client.Bin[] bins, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierbins - array of bin name/value pairshandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.append(EventLoop, WriteListener, WritePolicy, Key, Bin...)AerospikeClient prepend(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, com.aerospike.client.Bin[] bins, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierbins - array of bin name/value pairshandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.prepend(WritePolicy, Key, Bin...)AerospikeClient add(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, com.aerospike.client.Bin[] bins, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierbins - array of bin name/value pairshandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.add(EventLoop, WriteListener, WritePolicy, Key, Bin...)AerospikeClient delete(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.delete(EventLoop, DeleteListener, WritePolicy, Key)AerospikeClient touch(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Key>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.touch(EventLoop, WriteListener, WritePolicy, Key)AerospikeClient exists(com.aerospike.client.policy.Policy policy, com.aerospike.client.Key key, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> handler) throws com.aerospike.client.AerospikeException
policy - generic configuration parameters, pass in null for defaultskey - unique record identifierhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.exists(EventLoop, ExistsListener, Policy, Key)AerospikeClient exists(com.aerospike.client.policy.BatchPolicy batchPolicy, com.aerospike.client.Key[] keys, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.lang.Boolean>>> handler) throws com.aerospike.client.AerospikeException
batchPolicy - batch configuration parameters, pass in null for defaultskeys - unique record identifiershandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.exists(EventLoop, ExistsArrayListener, BatchPolicy, Key[])AerospikeClient get(com.aerospike.client.policy.Policy policy, com.aerospike.client.Key key, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler) throws com.aerospike.client.AerospikeException
policy - generic configuration parameters, pass in null for defaultskey - unique record identifierhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.get(EventLoop, RecordListener, Policy, Key)AerospikeClient get(com.aerospike.client.policy.Policy policy, com.aerospike.client.Key key, java.lang.String[] binNames, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler) throws com.aerospike.client.AerospikeException
policy - generic configuration parameters, pass in null for defaultskey - unique record identifierbinNames - bins to retrievehandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.get(EventLoop, RecordListener, Policy, Key, String...)AerospikeClient getHeader(com.aerospike.client.policy.Policy policy, com.aerospike.client.Key key, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler) throws com.aerospike.client.AerospikeException
policy - generic configuration parameters, pass in null for defaultskey - unique record identifierhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.getHeader(EventLoop, RecordListener, Policy, Key)AerospikeClient get(com.aerospike.client.policy.BatchPolicy batchPolicy, java.util.List<com.aerospike.client.BatchRead> records, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.BatchRead>>> handler) throws com.aerospike.client.AerospikeException
batchPolicy - batch configuration parameters, pass in null for defaultsrecords - list of unique record identifiers and the bins to retrieve.
The returned records are located in the same list.handler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.get(EventLoop, BatchListListener, BatchPolicy, List)AerospikeClient get(com.aerospike.client.policy.BatchPolicy batchPolicy, com.aerospike.client.Key[] keys, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.Record>>> handler) throws com.aerospike.client.AerospikeException
batchPolicy - batch configuration parameters, pass in null for defaultskeys - array of unique record identifiershandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.get(EventLoop, RecordArrayListener, BatchPolicy, Key[])AerospikeClient get(com.aerospike.client.policy.BatchPolicy batchPolicy, com.aerospike.client.Key[] keys, java.lang.String[] binNames, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.Record>>> handler) throws com.aerospike.client.AerospikeException
batchPolicy - batch configuration parameters, pass in null for defaultskeys - array of unique record identifiersbinNames - array of bins to retrievehandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.get(EventLoop, RecordArrayListener, BatchPolicy, Key[], String...)AerospikeClient getHeader(com.aerospike.client.policy.BatchPolicy batchPolicy, com.aerospike.client.Key[] keys, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.Record>>> handler) throws com.aerospike.client.AerospikeException
batchPolicy - batch configuration parameters, pass in null for defaultskeys - array of unique record identifiershandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.getHeader(EventLoop, RecordArrayListener, BatchPolicy, Key[])AerospikeClient operate(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, com.aerospike.client.Operation[] operations, io.vertx.core.Handler<io.vertx.core.AsyncResult<com.aerospike.client.Record>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifieroperations - database operations to performhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.operate(EventLoop, RecordListener, WritePolicy, Key, Operation...)AerospikeClient scanAll(com.aerospike.client.policy.ScanPolicy policy, java.lang.String namespace, java.lang.String setName, java.lang.String[] binNames, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.query.KeyRecord>>> handler) throws com.aerospike.client.AerospikeException
policy - scan configuration parameters, pass in null for defaultsnamespace - namespace - equivalent to database namesetName - optional set name - equivalent to database tablebinNames - optional bins to retrieve. All bins will be returned if empty.handler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.scanAll(EventLoop, RecordSequenceListener, ScanPolicy, String, String, String...)AerospikeClient scanPartitions(com.aerospike.client.policy.ScanPolicy policy, com.aerospike.client.query.PartitionFilter partitionFilter, java.lang.String namespace, java.lang.String setName, java.lang.String[] binNames, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.query.KeyRecord>>> handler) throws com.aerospike.client.AerospikeException
policy - scan configuration parameters, pass in null for defaultspartitionFilter - filter on a subset of data partitionsnamespace - namespace - equivalent to database namesetName - optional set name - equivalent to database tablebinNames - optional bins to retrieve. All bins will be returned if empty.handler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.scanPartitions(EventLoop, RecordSequenceListener, ScanPolicy, PartitionFilter, String, String, String...)AerospikeClient execute(com.aerospike.client.policy.WritePolicy writePolicy, com.aerospike.client.Key key, java.lang.String packageName, java.lang.String functionName, com.aerospike.client.Value[] functionArgs, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> handler) throws com.aerospike.client.AerospikeException
writePolicy - write configuration parameters, pass in null for defaultskey - unique record identifierpackageName - server package name where user defined function residesfunctionName - user defined functionfunctionArgs - arguments passed in to user defined functionhandler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.execute(EventLoop, ExecuteListener, WritePolicy, Key, String, String, Value...)AerospikeClient query(com.aerospike.client.policy.QueryPolicy queryPolicy, com.aerospike.client.query.Statement statement, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<com.aerospike.client.query.KeyRecord>>> handler) throws com.aerospike.client.AerospikeException
queryPolicy - query configuration parameters, pass in null for defaultsstatement - query filter. Statement instance is not suitable for reuse since it's modified in this method.handler - the handler that will handle the resultcom.aerospike.client.AerospikeException - if event loop registration failsAerospikeClient.query(EventLoop, RecordSequenceListener, QueryPolicy, Statement)Copyright © 2021. All rights reserved.