public interface IAsyncClient extends IAerospikeClient
The new efficient asynchronous API is located directly in IAerospikeClient. This class exists solely to provide compatibility with legacy applications.
This interface's sole purpose is to allow mock frameworks to operate on AsyncClient without being constrained by final methods.
Modifier and Type | Method and Description |
---|---|
void |
add(WritePolicy policy,
WriteListener listener,
Key key,
Bin... bins)
Asynchronously add integer bin values to existing record bin values.
|
void |
append(WritePolicy policy,
WriteListener listener,
Key key,
Bin... bins)
Asynchronously append bin string values to existing record bin values.
|
void |
delete(WritePolicy policy,
DeleteListener listener,
Key key)
Asynchronously delete record for specified key.
|
void |
execute(WritePolicy policy,
ExecuteListener listener,
Key key,
String packageName,
String functionName,
Value... functionArgs)
Asynchronously execute user defined function on server and return results.
|
void |
exists(BatchPolicy policy,
ExistsArrayListener listener,
Key[] keys)
Asynchronously check if multiple record keys exist in one batch call.
|
void |
exists(BatchPolicy policy,
ExistsSequenceListener listener,
Key[] keys)
Asynchronously check if multiple record keys exist in one batch call.
|
void |
exists(Policy policy,
ExistsListener listener,
Key key)
Asynchronously determine if a record key exists.
|
void |
get(BatchPolicy policy,
BatchListListener listener,
List<BatchRead> records)
Asynchronously read multiple records for specified batch keys in one batch call.
|
void |
get(BatchPolicy policy,
BatchSequenceListener listener,
List<BatchRead> records)
Asynchronously read multiple records for specified batch keys in one batch call.
|
void |
get(BatchPolicy policy,
RecordArrayListener listener,
Key[] keys)
Asynchronously read multiple records for specified keys in one batch call.
|
void |
get(BatchPolicy policy,
RecordArrayListener listener,
Key[] keys,
String... binNames)
Asynchronously read multiple record headers and bins for specified keys in one batch call.
|
void |
get(BatchPolicy policy,
RecordSequenceListener listener,
Key[] keys)
Asynchronously read multiple records for specified keys in one batch call.
|
void |
get(BatchPolicy policy,
RecordSequenceListener listener,
Key[] keys,
String... binNames)
Asynchronously read multiple record headers and bins for specified keys in one batch call.
|
void |
get(Policy policy,
RecordListener listener,
Key key)
Asynchronously read entire record for specified key.
|
void |
get(Policy policy,
RecordListener listener,
Key key,
String... binNames)
Asynchronously read record header and bins for specified key.
|
BatchPolicy |
getAsyncBatchPolicyDefault() |
QueryPolicy |
getAsyncQueryPolicyDefault() |
Policy |
getAsyncReadPolicyDefault() |
ScanPolicy |
getAsyncScanPolicyDefault() |
WritePolicy |
getAsyncWritePolicyDefault() |
void |
getHeader(BatchPolicy policy,
RecordArrayListener listener,
Key[] keys)
Asynchronously read multiple record header data for specified keys in one batch call.
|
void |
getHeader(BatchPolicy policy,
RecordSequenceListener listener,
Key[] keys)
Asynchronously read multiple record header data for specified keys in one batch call.
|
void |
getHeader(Policy policy,
RecordListener listener,
Key key)
Asynchronously read record generation and expiration only for specified key.
|
void |
operate(WritePolicy policy,
RecordListener listener,
Key key,
Operation... operations)
Asynchronously perform multiple read/write operations on a single key in one batch call.
|
void |
prepend(WritePolicy policy,
WriteListener listener,
Key key,
Bin... bins)
Asynchronously prepend bin string values to existing record bin values.
|
void |
put(WritePolicy policy,
WriteListener listener,
Key key,
Bin... bins)
Asynchronously write record bin(s).
|
void |
query(QueryPolicy policy,
RecordSequenceListener listener,
Statement statement)
Asynchronously execute query on all server nodes.
|
void |
scanAll(ScanPolicy policy,
RecordSequenceListener listener,
String namespace,
String setName,
String... binNames)
Asynchronously read all records in specified namespace and set.
|
void |
touch(WritePolicy policy,
WriteListener listener,
Key key)
Asynchronously create record if it does not already exist.
|
add, add, append, append, changePassword, close, createIndex, createIndex, createRole, createUser, delete, delete, dropIndex, dropRole, dropUser, execute, execute, execute, exists, exists, exists, exists, exists, get, get, get, get, get, get, get, get, get, get, get, get, get, getBatchPolicyDefault, getClusterStats, getHeader, getHeader, getHeader, getHeader, getHeader, getInfoPolicyDefault, getNode, getNodeNames, getNodes, getQueryPolicyDefault, getReadPolicyDefault, getScanPolicyDefault, getWritePolicyDefault, grantPrivileges, grantRoles, isConnected, operate, operate, prepend, prepend, put, put, query, query, queryAggregate, queryAggregate, queryAggregateNode, queryNode, queryRole, queryRoles, queryUser, queryUsers, register, register, registerUdfString, removeUdf, revokePrivileges, revokeRoles, scanAll, scanAll, scanNode, scanNode, touch, touch, truncate
Policy getAsyncReadPolicyDefault()
WritePolicy getAsyncWritePolicyDefault()
ScanPolicy getAsyncScanPolicyDefault()
QueryPolicy getAsyncQueryPolicyDefault()
BatchPolicy getAsyncBatchPolicyDefault()
void put(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException
The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifierbins
- array of bin name/value pairsAerospikeException
- if queue is fullvoid append(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException
The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists. This call only works for string values.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifierbins
- array of bin name/value pairsAerospikeException
- if queue is fullvoid prepend(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException
The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists. This call works only for string values.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifierbins
- array of bin name/value pairsAerospikeException
- if queue is fullvoid add(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException
The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists. This call only works for integer values.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifierbins
- array of bin name/value pairsAerospikeException
- if queue is fullvoid delete(WritePolicy policy, DeleteListener listener, Key key) throws AerospikeException
The policy specifies the transaction timeout.
policy
- delete configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifierAerospikeException
- if queue is fullvoid touch(WritePolicy policy, WriteListener listener, Key key) throws AerospikeException
This method schedules the touch command with a channel selector and returns. Another thread will process the command and send the results to the listener.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifierAerospikeException
- if queue is fullvoid exists(Policy policy, ExistsListener listener, Key key) throws AerospikeException
The policy can be used to specify timeouts.
policy
- generic configuration parameters, pass in null for defaultslistener
- where to send resultskey
- unique record identifierAerospikeException
- if queue is fullvoid exists(BatchPolicy policy, ExistsArrayListener listener, Key[] keys) throws AerospikeException
The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersAerospikeException
- if queue is fullvoid exists(BatchPolicy policy, ExistsSequenceListener listener, Key[] keys) throws AerospikeException
The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersAerospikeException
- if queue is fullvoid get(Policy policy, RecordListener listener, Key key) throws AerospikeException
The policy can be used to specify timeouts.
policy
- generic configuration parameters, pass in null for defaultslistener
- where to send resultskey
- unique record identifierAerospikeException
- if queue is fullvoid get(Policy policy, RecordListener listener, Key key, String... binNames) throws AerospikeException
The policy can be used to specify timeouts.
policy
- generic configuration parameters, pass in null for defaultslistener
- where to send resultskey
- unique record identifierbinNames
- bins to retrieveAerospikeException
- if queue is fullvoid getHeader(Policy policy, RecordListener listener, Key key) throws AerospikeException
The policy can be used to specify timeouts.
policy
- generic configuration parameters, pass in null for defaultslistener
- where to send resultskey
- unique record identifierAerospikeException
- if queue is fullvoid get(BatchPolicy policy, BatchListListener listener, List<BatchRead> records) throws AerospikeException
This method schedules the get command with a channel selector and returns. Another thread will process the command and send the results to the listener in a single call. This method requires Aerospike Server version >= 3.6.0.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultsrecords
- list of unique record identifiers and the bins to retrieve.AerospikeException
- if read failsvoid get(BatchPolicy policy, BatchSequenceListener listener, List<BatchRead> records) throws AerospikeException
This method schedules the get command with a channel selector and returns. Another thread will process the command and send the results to the listener in a single call. This method requires Aerospike Server version >= 3.6.0.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultsrecords
- list of unique record identifiers and the bins to retrieve.AerospikeException
- if read failsvoid get(BatchPolicy policy, RecordArrayListener listener, Key[] keys) throws AerospikeException
If a key is not found, the record will be null. The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersAerospikeException
- if queue is fullvoid get(BatchPolicy policy, RecordSequenceListener listener, Key[] keys) throws AerospikeException
If a key is not found, the record will be null. The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersAerospikeException
- if queue is fullvoid get(BatchPolicy policy, RecordArrayListener listener, Key[] keys, String... binNames) throws AerospikeException
If a key is not found, the record will be null. The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersbinNames
- array of bins to retrieveAerospikeException
- if queue is fullvoid get(BatchPolicy policy, RecordSequenceListener listener, Key[] keys, String... binNames) throws AerospikeException
If a key is not found, the record will be null. The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersbinNames
- array of bins to retrieveAerospikeException
- if queue is fullvoid getHeader(BatchPolicy policy, RecordArrayListener listener, Key[] keys) throws AerospikeException
If a key is not found, the record will be null. The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersAerospikeException
- if queue is fullvoid getHeader(BatchPolicy policy, RecordSequenceListener listener, Key[] keys) throws AerospikeException
If a key is not found, the record will be null. The policy can be used to specify timeouts and maximum parallel commands.
policy
- batch configuration parameters, pass in null for defaultslistener
- where to send resultskeys
- array of unique record identifiersAerospikeException
- if queue is fullvoid operate(WritePolicy policy, RecordListener listener, Key key, Operation... operations) throws AerospikeException
This method schedules the operate command with a channel selector and returns. Another thread will process the command and send the results to the listener.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetkey
- unique record identifieroperations
- database operations to performAerospikeException
- if queue is fullvoid scanAll(ScanPolicy policy, RecordSequenceListener listener, String namespace, String setName, String... binNames) throws AerospikeException
concurrentNodes
is specified, each server node will be read in
parallel. Otherwise, server nodes are read in series.
This method schedules the scan command with a channel selector and returns. Another thread will process the command and send the results to the listener.
policy
- scan configuration parameters, pass in null for defaultslistener
- where to send results, pass in null for fire and forgetnamespace
- namespace - equivalent to database namesetName
- optional set name - equivalent to database tablebinNames
- optional bin to retrieve. All bins will be returned if not specified.
Aerospike 2 servers ignore this parameter.AerospikeException
- if queue is fullvoid execute(WritePolicy policy, ExecuteListener listener, Key key, String packageName, String functionName, Value... functionArgs) throws AerospikeException
udf file =
This method schedules the execute command with a channel selector and returns.
Another thread will process the command and send the results to the listener.
policy
- write configuration parameters, pass in null for defaultslistener
- where to send resultskey
- unique record identifierpackageName
- server package name where user defined function residesfunctionName
- user defined functionfunctionArgs
- arguments passed in to user defined functionAerospikeException
- if transaction failsvoid query(QueryPolicy policy, RecordSequenceListener listener, Statement statement) throws AerospikeException
maxConcurrentNodes
dictate how many nodes can be queried in parallel.
The default is to query all nodes in parallel.
This method schedules the node's query commands with channel selectors and returns. Selector threads will process the commands and send the results to the listener.
policy
- query configuration parameters, pass in null for defaultslistener
- where to send resultsstatement
- database query command parametersAerospikeException
- if query failsCopyright ? 2012–2018 Aerospike, Inc. All rights reserved.