AsyncClient Class

Asynchronous Aerospike client.

Your application uses this class to perform asynchronous database operations such as writing and reading records, and selecting sets of records. Write operations include specialized functionality such as append/prepend and arithmetic addition.

This client is thread-safe. One client instance should be used per cluster. Multiple threads should share this cluster instance.

Each record may have multiple bins, unless the Aerospike server nodes are configured as "single-bin". In "multi-bin" mode, partial records may be written or read by specifying the relevant subset of bins.

Definition

Namespace: Aerospike.Client
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 7.0.1
C#
public class AsyncClient : AerospikeClient, 
	IAsyncClient, IAerospikeClient
Inheritance
Object    AerospikeClient    AsyncClient
Implements
IAerospikeClient, IAsyncClient

Constructors

AsyncClient(AsyncClientPolicy, Host) Initialize asynchronous client with suitable hosts to seed the cluster map. The client policy is used to set defaults and size internal data structures. For each host connection that succeeds, the client will:
  • Add host to the cluster map
  • Request host's list of other nodes in cluster
  • Add these nodes to cluster map

In most cases, only one host is necessary to seed the cluster. The remaining hosts are added as future seeds in case of a complete network failure.

If one connection succeeds, the client is ready to process database requests. If all connections fail and the policy's failIfNotConnected is true, a connection exception will be thrown. Otherwise, the cluster will remain in a disconnected state until the server is activated.

AsyncClient(String, Int32) Initialize asynchronous client. If the host connection succeeds, the client will:
  • Add host to the cluster map
  • Request host's list of other nodes in cluster
  • Add these nodes to cluster map

If the connection succeeds, the client is ready to process database requests. If the connection fails, the cluster will remain in a disconnected state until the server is activated.

AsyncClient(AsyncClientPolicy, String, Int32) Initialize asynchronous client. The client policy is used to set defaults and size internal data structures. If the host connection succeeds, the client will:
  • Add host to the cluster map
  • Request host's list of other nodes in cluster
  • Add these nodes to cluster map

If the connection succeeds, the client is ready to process database requests. If the connection fails and the policy's failOnInvalidHosts is true, a connection exception will be thrown. Otherwise, the cluster will remain in a disconnected state until the server is activated.

Properties

BatchDeletePolicyDefault Default delete policy used in batch delete commands.
(Inherited from AerospikeClient)
BatchParentPolicyWriteDefault Default parent policy used in batch write commands. Parent policy fields include socketTimeout, totalTimeout, maxRetries, etc...
(Inherited from AerospikeClient)
BatchPolicyDefault Default parent policy used in batch read commands.Parent policy fields include socketTimeout, totalTimeout, maxRetries, etc...
(Inherited from AerospikeClient)
BatchUDFPolicyDefault Default user defined function policy used in batch UDF excecute commands.
(Inherited from AerospikeClient)
BatchWritePolicyDefault Default write policy used in batch operate commands. Write policy fields include generation, expiration, durableDelete, etc...
(Inherited from AerospikeClient)
Cluster Cluster associated with this AerospikeClient instance.
(Inherited from AerospikeClient)
Connected Return if we are ready to talk to the database server cluster.
(Inherited from AerospikeClient)
Disposed
(Inherited from AerospikeClient)
InfoPolicyDefault Default info policy that is used when info command policy is null.
(Inherited from AerospikeClient)
Nodes Return array of active server nodes in the cluster.
(Inherited from AerospikeClient)
QueryPolicyDefault Default query policy that is used when query command policy is null.
(Inherited from AerospikeClient)
ReadPolicyDefault Default read policy that is used when read command policy is null.
(Inherited from AerospikeClient)
ScanPolicyDefault Default scan policy that is used when scan command policy is null.
(Inherited from AerospikeClient)
WritePolicyDefault Default write policy that is used when write command policy is null.
(Inherited from AerospikeClient)

Methods

Add(WritePolicy, Key, Bin) Add integer/double bin values to existing record bin values. The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.
(Inherited from AerospikeClient)
Add(WritePolicy, WriteListener, Key, Bin) Asynchronously add integer/double bin values to existing record bin values. Schedule the add command with a channel selector and return. Another thread will process the command and send the results to the listener.

The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.

Add(WritePolicy, CancellationToken, Key, Bin) Asynchronously add integer/double bin values to existing record bin values. Create listener, call asynchronous add and return task monitor.

The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.

Append(WritePolicy, Key, Bin) Append bin string values to existing record bin values. 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.
(Inherited from AerospikeClient)
Append(WritePolicy, WriteListener, Key, Bin) Asynchronously append bin string values to existing record bin values. Schedule the append command with a channel selector and return. Another thread will process the command and send the results to the listener.

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.

Append(WritePolicy, CancellationToken, Key, Bin) Asynchronously append bin string values to existing record bin values. Create listener, call asynchronous append and return task monitor.

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.

ChangePassword Change user's password.
(Inherited from AerospikeClient)
Close Close all client connections to database server nodes.
(Inherited from AerospikeClient)
CreateIndex(Policy, String, String, String, String, IndexType) Create scalar secondary index. This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned IndexTask instance.
(Inherited from AerospikeClient)
CreateIndex(Policy, String, String, String, String, IndexType, IndexCollectionType, CTX) Create complex secondary index on bins containing collections. This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned IndexTask instance.
(Inherited from AerospikeClient)
CreateRole(AdminPolicy, String, IListPrivilege) Create user defined role.
(Inherited from AerospikeClient)
CreateRole(AdminPolicy, String, IListPrivilege, IListString) Create user defined role with optional privileges and whitelist.
(Inherited from AerospikeClient)
CreateRole(AdminPolicy, String, IListPrivilege, IListString, Int32, Int32) Create user defined role with optional privileges, whitelist and read/write quotas. Quotas require server security configuration "enable-quotas" to be set to true.
(Inherited from AerospikeClient)
CreateUser Create user with password and roles. Clear-text password will be hashed using bcrypt before sending to server.
(Inherited from AerospikeClient)
Delete(WritePolicy, Key) Delete record for specified key. Return whether record existed on server before deletion. The policy specifies the transaction timeout.
(Inherited from AerospikeClient)
Delete(BatchPolicy, BatchDeletePolicy, Key) Delete records for specified keys. If a key is not found, the corresponding result resultCode will be KEY_NOT_FOUND_ERROR.

Requires server version 6.0+


(Inherited from AerospikeClient)
Delete(WritePolicy, DeleteListener, Key) Asynchronously delete record for specified key. Schedule the delete command with a channel selector and return. Another thread will process the command and send the results to the listener.
Delete(WritePolicy, CancellationToken, Key) Asynchronously delete record for specified key. Create listener, call asynchronous delete and return task monitor.
Delete(BatchPolicy, BatchDeletePolicy, BatchRecordArrayListener, Key) Asynchronously delete records for specified keys. Schedule the delete command with a channel selector and return. Another thread will process the command and send the results to the listener.

If a key is not found, the corresponding result resultCode will be KEY_NOT_FOUND_ERROR.

Requires server version 6.0+

Delete(BatchPolicy, BatchDeletePolicy, BatchRecordSequenceListener, Key) Asynchronously delete records for specified keys. Schedule the delete command with a channel selector and return. Another thread will process the command and send the results to the listener.

Each record result is returned in separate OnRecord() calls. If a key is not found, the corresponding result resultCode will be KEY_NOT_FOUND_ERROR.

Requires server version 6.0+

Delete(BatchPolicy, BatchDeletePolicy, CancellationToken, Key) Asynchronously delete records for specified keys. Create listener, call asynchronous delete and return task monitor.

Requires server version 6.0+

Dispose Close all client connections to database server nodes.
(Inherited from AerospikeClient)
DropIndex Delete secondary index. This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned IndexTask instance.
(Inherited from AerospikeClient)
DropRole Drop user defined role.
(Inherited from AerospikeClient)
DropUser Remove user from cluster.
(Inherited from AerospikeClient)
Execute(WritePolicy, Statement, Operation) Apply operations on records that match the background query statement filter. Records are not returned to the client. This asynchronous server call will return before the command is complete. The user can optionally wait for command completion by using the returned ExecuteTask instance.
(Inherited from AerospikeClient)
Execute(WritePolicy, Key, String, String, Value) Execute user defined function on server and return results. The function operates on a single record. The package name is used to locate the udf file location:

udf file = <server udf dir>/<package name>.lua


(Inherited from AerospikeClient)
Execute(WritePolicy, Statement, String, String, Value) Apply user defined function on records that match the background query statement filter. Records are not returned to the client. This asynchronous server call will return before the command is complete. The user can optionally wait for command completion by using the returned ExecuteTask instance.
(Inherited from AerospikeClient)
Execute(BatchPolicy, BatchUDFPolicy, Key, String, String, Value) Execute user defined function on server for each key and return results. The package name is used to locate the udf file location:

udf file = <server udf dir>/<package name>.lua

Requires server version 6.0+


(Inherited from AerospikeClient)
Execute(WritePolicy, ExecuteListener, Key, String, String, Value) Asynchronously execute user defined function on server and return result. The function operates on a single record. The package name is used to locate the udf file location on the server:

udf file = <server udf dir>/<package name>.lua

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.

Execute(WritePolicy, CancellationToken, Key, String, String, Value) Asynchronously execute user defined function on server for a single record and return result. Create listener, call asynchronous execute and return task monitor.
Execute(BatchPolicy, BatchUDFPolicy, BatchRecordArrayListener, Key, String, String, Value) Asynchronously execute user defined function on server for each key. 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.

The package name is used to locate the udf file location:

udf file = <server udf dir>/<package name>.lua

Requires server version 6.0+

Execute(BatchPolicy, BatchUDFPolicy, BatchRecordSequenceListener, Key, String, String, Value) Asynchronously execute user defined function on server for each key. 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. Each record result is returned in separate OnRecord() calls.

The package name is used to locate the udf file location:

udf file = <server udf dir>/<package name>.lua

Requires server version 6.0+

Execute(BatchPolicy, BatchUDFPolicy, CancellationToken, Key, String, String, Value) Asynchronously execute user defined function on server for each key. Create listener, call asynchronous delete and return task monitor.

Requires server version 6.0+

Exists(BatchPolicy, Key) Check if multiple record keys exist in one batch call. The returned boolean array is in positional order with the original key array order.
(Inherited from AerospikeClient)
Exists(Policy, Key) Determine if a record key exists. Return whether record exists or not. The policy can be used to specify timeouts.
(Inherited from AerospikeClient)
Exists(BatchPolicy, ExistsArrayListener, Key) Asynchronously check if multiple record keys exist in one batch call. Schedule the array exists command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.
Exists(BatchPolicy, ExistsSequenceListener, Key) Asynchronously check if multiple record keys exist in one batch call. Schedule the exists command with a channel selector and return. Another thread will process the command and send the results to the listener in multiple unordered calls.
Exists(BatchPolicy, CancellationToken, Key) Asynchronously check if multiple record keys exist in one batch call. Create listener, call asynchronous array exists and return task monitor.
Exists(Policy, ExistsListener, Key) Asynchronously determine if a record key exists. Schedule the exists command with a channel selector and return. Another thread will process the command and send the results to the listener.
Exists(Policy, CancellationToken, Key) Asynchronously determine if a record key exists. Create listener, call asynchronous exists and return task monitor.
Get(BatchPolicy, Key) Read multiple records for specified keys in one batch call. The returned records are in positional order with the original key array order. If a key is not found, the positional record will be null.
(Inherited from AerospikeClient)
Get(BatchPolicy, ListBatchRead) Read multiple records for specified batch keys in one batch call. This method allows different namespaces/bins to be requested for each key in the batch. The returned records are located in the same list. If the BatchRead key field is not found, the corresponding record field will be null.
(Inherited from AerospikeClient)
Get(Policy, Key) Read entire record for specified key. If found, return record instance. If not found, return null. The policy can be used to specify timeouts.
(Inherited from AerospikeClient)
Get(BatchPolicy, Key, Operation) Read multiple records for specified keys using read operations in one batch call. The returned records are in positional order with the original key array order. If a key is not found, the positional record will be null.
(Inherited from AerospikeClient)
Get(BatchPolicy, Key, String) Read multiple record headers and bins for specified keys in one batch call. The returned records are in positional order with the original key array order. If a key is not found, the positional record will be null.
(Inherited from AerospikeClient)
Get(BatchPolicy, BatchListListener, ListBatchRead) Asynchronously read multiple records for specified batch keys in one batch call. This method allows different namespaces/bins to be requested for each key in the batch. The returned records are located in the same list. If the BatchRecord key field is not found, the corresponding record field will be null.

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.

Get(BatchPolicy, BatchSequenceListener, ListBatchRead) Asynchronously read multiple records for specified batch keys in one batch call. This method allows different namespaces/bins to be requested for each key in the batch. The returned records are located in the same list. If the BatchRecord key field is not found, the corresponding record field will be null.

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.

Get(BatchPolicy, RecordArrayListener, Key) Asynchronously read multiple records for specified keys in one batch call. Schedule the batch get command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.

If a key is not found, the record will be null.

Get(BatchPolicy, RecordSequenceListener, Key) Asynchronously read multiple records for specified keys in one batch call. Schedule the get command with a channel selector and return. Another thread will process the command and send the results to the listener in multiple unordered calls.

If a key is not found, the record will be null.

Get(BatchPolicy, CancellationToken, Key) Asynchronously read multiple records for specified keys in one batch call. Create listener, call asynchronous batch get and return task monitor.

If a key is not found, the record will be null.

Get(BatchPolicy, CancellationToken, ListBatchRead) Asynchronously read multiple records for specified batch keys in one batch call. This method allows different namespaces/bins to be requested for each key in the batch. The returned records are located in the same list.

Create listener, call asynchronous batch get and return task monitor.

Get(Policy, Key, String) Read record header and bins for specified key. If found, return record instance. If not found, return null. The policy can be used to specify timeouts.
(Inherited from AerospikeClient)
Get(Policy, RecordListener, Key) Asynchronously read entire record for specified key. Schedule the get command with a channel selector and return. Another thread will process the command and send the results to the listener.
Get(Policy, CancellationToken, Key) Asynchronously read entire record for specified key. Create listener, call asynchronous get and return task monitor.
Get(BatchPolicy, RecordArrayListener, Key, Operation) Asynchronously read multiple records for specified keys using read operations in one batch call. Schedule the batch get command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.

The returned records are in positional order with the original key array order. If a key is not found, the positional record will be null.

Get(BatchPolicy, RecordArrayListener, Key, String) Asynchronously read multiple record headers and bins for specified keys in one batch call. Schedule the batch get command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.

If a key is not found, the record will be null.

Get(BatchPolicy, RecordSequenceListener, Key, Operation) Asynchronously read multiple records for specified keys using read operations in one batch call. Schedule the batch get command with a channel selector and return. Another thread will process the command and send the results to the listener in multiple unordered calls.

Each record result is returned in separate OnRecord() calls. If a key is not found, the record will be null.

Get(BatchPolicy, RecordSequenceListener, Key, String) Asynchronously read multiple record headers and bins for specified keys in one batch call. Schedule the batch get command with a channel selector and return. Another thread will process the command and send the results to the listener in multiple unordered calls.

If a key is not found, the record will be null.

Get(BatchPolicy, CancellationToken, Key, Operation) Asynchronously read multiple record headers and bins for specified keys using read operations in one batch call. Create listener, call asynchronous batch get and return task monitor.

If a key is not found, the record will be null.

Get(BatchPolicy, CancellationToken, Key, String) Asynchronously read multiple record headers and bins for specified keys in one batch call. Create listener, call asynchronous batch get and return task monitor.

If a key is not found, the record will be null.

Get(Policy, RecordListener, Key, String) Asynchronously read record header and bins for specified key. Schedule the get command with a channel selector and return. Another thread will process the command and send the results to the listener.
Get(Policy, CancellationToken, Key, String) Asynchronously read record header and bins for specified key. Create listener, call asynchronous get and return task monitor.
GetClusterStats Return operating cluster statistics.
(Inherited from AerospikeClient)
GetHeader(BatchPolicy, Key) Read multiple record header data for specified keys in one batch call. The returned records are in positional order with the original key array order. If a key is not found, the positional record will be null.
(Inherited from AerospikeClient)
GetHeader(Policy, Key) Read record generation and expiration only for specified key. Bins are not read. If found, return record instance. If not found, return null. The policy can be used to specify timeouts.
(Inherited from AerospikeClient)
GetHeader(BatchPolicy, RecordArrayListener, Key) Asynchronously read multiple record header data for specified keys in one batch call. Schedule the batch get header command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.

If a key is not found, the record will be null.

GetHeader(BatchPolicy, RecordSequenceListener, Key) Asynchronously read multiple record header data for specified keys in one batch call. Schedule the batch get header command with a channel selector and return. Another thread will process the command and send the results to the listener in multiple unordered calls.

If a key is not found, the record will be null.

GetHeader(BatchPolicy, CancellationToken, Key) Asynchronously read multiple record header data for specified keys in one batch call. Create listener, call asynchronous batch header get and return task monitor.

If a key is not found, the record will be null.

GetHeader(Policy, RecordListener, Key) Asynchronously read record generation and expiration only for specified key. Bins are not read. Schedule the get command with a channel selector and return. Another thread will process the command and send the results to the listener.
GetHeader(Policy, CancellationToken, Key) Asynchronously read record generation and expiration only for specified key. Bins are not read. Create listener, call asynchronous get header and return task monitor.
GrantPrivileges Grant privileges to an user defined role.
(Inherited from AerospikeClient)
GrantRoles Add roles to user's list of roles.
(Inherited from AerospikeClient)
Join(BatchPolicy, Key, Join) Read all bins in left record and then join with right records. Each join bin name (Join.binNameKeys) must exist in the left record. The join bin must contain a list of keys. Those key are used to retrieve other records using a separate batch get.
(Inherited from AerospikeClient)
Join(BatchPolicy, Key, String, Join) Read specified bins in left record and then join with right records. Each join bin name (Join.leftKeysBinName) must exist in the left record. The join bin must contain a list of keys. Those key are used to retrieve other records using a separate batch get.
(Inherited from AerospikeClient)
Operate(BatchPolicy, ListBatchRecord) Read/Write multiple records for specified batch keys in one batch call. This method allows different namespaces/bins for each key in the batch. The returned records are located in the same list.

BatchRecord can be BatchRead, BatchWrite, BatchDelete or BatchUDF.

Requires server version 6.0+


(Inherited from AerospikeClient)
Operate(BatchPolicy, BatchOperateListListener, ListBatchRecord) Asynchronously read/write multiple records for specified batch keys in one batch call. Schedule command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.

This method allows different namespaces/bins to be requested for each key in the batch. The returned records are located in the same list.

BatchRecord can be BatchRead, BatchWrite, BatchDelete or BatchUDF.

Requires server version 6.0+

Operate(BatchPolicy, BatchRecordSequenceListener, ListBatchRecord) Asynchronously read/write multiple records for specified batch keys in one batch call. 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 allows different namespaces/bins to be requested for each key in the batch. Each record result is returned in separate OnRecord() calls. The returned records are located in the same list.

BatchRecord can be BatchRead, BatchWrite, BatchDelete or BatchUDF.

Requires server version 6.0+

Operate(BatchPolicy, CancellationToken, ListBatchRecord) Asynchronously read/write multiple records for specified batch keys in one batch call. Create listener, call asynchronous delete and return task monitor.

Requires server version 6.0+

Operate(WritePolicy, Key, Operation) Perform multiple read/write operations on a single key in one batch call. An example would be to add an integer value to an existing record and then read the result, all in one database call.

The server executes operations in the same order as the operations array. Both scalar bin operations (Operation) and CDT bin operations (ListOperation, MapOperation) can be performed in same call.


(Inherited from AerospikeClient)
Operate(BatchPolicy, BatchWritePolicy, Key, Operation) Perform read/write operations on multiple keys. If a key is not found, the corresponding result resultCode will be KEY_NOT_FOUND_ERROR.

Requires server version 6.0+


(Inherited from AerospikeClient)
Operate(WritePolicy, RecordListener, Key, Operation) Asynchronously perform multiple read/write operations on a single key in one batch call. Schedule the operate command with a channel selector and return. Another thread will process the command and send the results to the listener.

An example would be to add an integer value to an existing record and then read the result, all in one database call.

Operate(WritePolicy, CancellationToken, Key, Operation) Asynchronously perform multiple read/write operations on a single key in one batch call. Create listener, call asynchronous operate and return task monitor.

An example would be to add an integer value to an existing record and then read the result, all in one database call.

The server executes operations in the same order as the operations array. Both scalar bin operations (Operation) and CDT bin operations (ListOperation, MapOperation) can be performed in same call.

Operate(BatchPolicy, BatchWritePolicy, BatchRecordArrayListener, Key, Operation) Asynchronously perform read/write operations on multiple keys. Schedule command with a channel selector and return. Another thread will process the command and send the results to the listener in a single call.

If a key is not found, the corresponding result resultCode will be KEY_NOT_FOUND_ERROR.

Requires server version 6.0+

Operate(BatchPolicy, BatchWritePolicy, BatchRecordSequenceListener, Key, Operation) Asynchronously perform read/write operations on multiple keys. Schedule command with a channel selector and return. Another thread will process the command and send the results to the listener.

Each record result is returned in separate OnRecord() calls. If a key is not found, the corresponding result resultCode will be KEY_NOT_FOUND_ERROR.

Requires server version 6.0+

Operate(BatchPolicy, BatchWritePolicy, CancellationToken, Key, Operation) Asynchronously perform read/write operations on multiple keys. Create listener, call asynchronous delete and return task monitor.

Requires server version 6.0+

Prepend(WritePolicy, Key, Bin) Prepend bin string values to existing record bin values. 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.
(Inherited from AerospikeClient)
Prepend(WritePolicy, WriteListener, Key, Bin) Asynchronously prepend bin string values to existing record bin values. Schedule the prepend command with a channel selector and return. Another thread will process the command and send the results to the listener.

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.

Prepend(WritePolicy, CancellationToken, Key, Bin) Asynchronously prepend bin string values to existing record bin values. Create listener, call asynchronous prepend and return task monitor.

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.

Put(WritePolicy, Key, Bin) Write record bin(s). The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.
(Inherited from AerospikeClient)
Put(WritePolicy, WriteListener, Key, Bin) Asynchronously write record bin(s). Schedules the put command with a channel selector and return. Another thread will process the command and send the results to the listener.

The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.

Put(WritePolicy, CancellationToken, Key, Bin) Asynchronously write record bin(s). Create listener, call asynchronous put and return task monitor.

The policy specifies the transaction timeout, record expiration and how the transaction is handled when the record already exists.

Query(QueryPolicy, Statement) Execute query and return record iterator. The query executor puts records on a queue in separate threads. The calling thread concurrently pops records off the queue through the record iterator.
(Inherited from AerospikeClient)
Query(QueryPolicy, Statement, QueryListener) Execute query on all server nodes and return records via the listener. This method will block until the query is complete. Listener callbacks are made within the scope of this call.

If maxConcurrentNodes is not 1, the supplied listener must handle shared data in a thread-safe manner, because the listener will be called by multiple query threads (one thread per node) in parallel.

Requires server version 6.0+ if using a secondary index query.


(Inherited from AerospikeClient)
Query(QueryPolicy, Statement, ActionKey, Record) Execute query and call action for each record returned from server.
(Inherited from AerospikeClient)
Query(QueryPolicy, RecordSequenceListener, Statement) Asynchronously execute query on all server nodes. The query policy's
C#
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.

Requires server version 6.0+ if using a secondary index query.

Query(QueryPolicy, Statement, PartitionFilter, QueryListener) Execute query for specified partitions and return records via the listener. This method will block until the query is complete. Listener callbacks are made within the scope of this call.

If maxConcurrentNodes is not 1, the supplied listener must handle shared data in a thread-safe manner, because the listener will be called by multiple query threads (one thread per node) in parallel.

The completion status of all partitions is stored in the partitionFilter when the query terminates. This partitionFilter can then be used to resume an incomplete query at a later time. This is the preferred method for query terminate/resume functionality.

Requires server version 6.0+ if using a secondary index query.


(Inherited from AerospikeClient)
QueryAggregate(QueryPolicy, Statement) Execute query, apply statement's aggregation function, and return result iterator. The aggregation function should be initialized via the statement's SetAggregateFunction() and should be located in a Lua resource file located in an assembly.

The query executor puts results on a queue in separate threads. The calling thread concurrently pops results off the queue through the ResultSet iterator. The aggregation function is called on both server and client (final reduce). Therefore, the Lua script file must also reside on both server and client.


(Inherited from AerospikeClient)
QueryAggregate(QueryPolicy, Statement, ActionObject) Execute query, apply statement's aggregation function, call action for each aggregation object returned from server.
(Inherited from AerospikeClient)
QueryAggregate(QueryPolicy, Statement, String, String, Value) Execute query, apply statement's aggregation function, and return result iterator. The aggregation function should be located in a Lua script file that can be found from the "LuaConfig.PackagePath" paths static variable. The default package path is "udf/?.lua" where "?" is the packageName.

The query executor puts results on a queue in separate threads. The calling thread concurrently pops results off the queue through the ResultSet iterator. The aggregation function is called on both server and client (final reduce). Therefore, the Lua script file must also reside on both server and client.


(Inherited from AerospikeClient)
QueryPartitions(QueryPolicy, Statement, PartitionFilter) Execute query for specified partitions and return record iterator. The query executor puts records on a queue in separate threads. The calling thread concurrently pops records off the queue through the record iterator.

Requires server version 6.0+ if using a secondary index query.


(Inherited from AerospikeClient)
QueryPartitions(QueryPolicy, RecordSequenceListener, Statement, PartitionFilter) Asynchronously execute query for specified partitions. The query policy's
C#
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.

Each record result is returned in separate OnRecord() calls.

Requires server version 6.0+ if using a secondary index query.

QueryRole Retrieve role definition.
(Inherited from AerospikeClient)
QueryRoles Retrieve all roles.
(Inherited from AerospikeClient)
QueryUser Retrieve roles for a given user.
(Inherited from AerospikeClient)
QueryUsers Retrieve all users and their roles.
(Inherited from AerospikeClient)
Register(Policy, String, String, Language) Register package located in a file containing user defined functions with server. This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned RegisterTask instance.
(Inherited from AerospikeClient)
Register(Policy, Assembly, String, String, Language) Register package located in a resource containing user defined functions with server. This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned RegisterTask instance.
(Inherited from AerospikeClient)
RegisterUdfString Register UDF functions located in a code string with server. Example:
C#
 String code = @"
 local function reducer(val1,val2)
      return val1 + val2
 end

 function sum_single_bin(stream,name)
   local function mapper(rec)
     return rec[name]
   end
   return stream : map(mapper) : reduce(reducer)
 end
";

    client.RegisterUdfString(null, code, "mysum.lua", Language.LUA);

This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned RegisterTask instance.


(Inherited from AerospikeClient)
RemoveUdf Remove user defined function from server nodes.
(Inherited from AerospikeClient)
RevokePrivileges Revoke privileges from an user defined role.
(Inherited from AerospikeClient)
RevokeRoles Remove roles from user's list of roles.
(Inherited from AerospikeClient)
ScanAll(ScanPolicy, String, String, ScanCallback, String) Read all records in specified namespace and set. If the policy's concurrentNodes is specified, each server node will be read in parallel. Otherwise, server nodes are read in series.

This call will block until the scan is complete - callbacks are made within the scope of this call.


(Inherited from AerospikeClient)
ScanAll(ScanPolicy, RecordSequenceListener, String, String, String) Asynchronously read all records in specified namespace and set. If the policy's 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.

ScanNode(ScanPolicy, Node, String, String, ScanCallback, String) Read all records in specified namespace and set for one node only.

This call will block until the scan is complete - callbacks are made within the scope of this call.


(Inherited from AerospikeClient)
ScanNode(ScanPolicy, String, String, String, ScanCallback, String) Read all records in specified namespace and set for one node only. The node is specified by name.

This call will block until the scan is complete - callbacks are made within the scope of this call.


(Inherited from AerospikeClient)
ScanPartitions(ScanPolicy, PartitionFilter, String, String, ScanCallback, String) Read records in specified namespace, set and partition filter.

This call will block until the scan is complete - callbacks are made within the scope of this call.


(Inherited from AerospikeClient)
ScanPartitions(ScanPolicy, RecordSequenceListener, PartitionFilter, String, String, String) Asynchronously read records in specified namespace, set and partition filter. If the policy's 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.

SetQuotas Set maximum reads/writes per second limits for a role. If a quota is zero, the limit is removed. Quotas require server security configuration "enable-quotas" to be set to true.
(Inherited from AerospikeClient)
SetWhitelist Set IP address whitelist for a role. If whitelist is null or empty, remove existing whitelist from role.
(Inherited from AerospikeClient)
SetXDRFilter Set XDR filter for given datacenter name and namespace. The expression filter indicates which records XDR should ship to the datacenter.
(Inherited from AerospikeClient)
Touch(WritePolicy, Key) Reset record's time to expiration using the policy's expiration. Fail if the record does not exist.
(Inherited from AerospikeClient)
Touch(WritePolicy, WriteListener, Key) Asynchronously reset record's time to expiration using the policy's expiration. Schedule the touch command with a channel selector and return. Another thread will process the command and send the results to the listener. Fail if the record does not exist.
Touch(WritePolicy, CancellationToken, Key) Asynchronously reset record's time to expiration using the policy's expiration. Create listener, call asynchronous touch and return task monitor. Fail if the record does not exist.
Truncate Remove records in specified namespace/set efficiently. This method is many orders of magnitude faster than deleting records one at a time.

See https://www.aerospike.com/docs/reference/info#truncate

This asynchronous server call may return before the truncation is complete. The user can still write new records after the server returns because new records will have last update times greater than the truncate cutoff (set at the time of truncate call).


(Inherited from AerospikeClient)

Fields

batchDeletePolicyDefault Default delete policy used in batch delete commands.
(Inherited from AerospikeClient)
batchParentPolicyWriteDefault Default parent policy used in batch write commands. Parent policy fields include socketTimeout, totalTimeout, maxRetries, etc...
(Inherited from AerospikeClient)
batchPolicyDefault Default parent policy used in batch read commands. Parent policy fields include socketTimeout, totalTimeout, maxRetries, etc...
(Inherited from AerospikeClient)
batchUDFPolicyDefault Default user defined function policy used in batch UDF excecute commands.
(Inherited from AerospikeClient)
batchWritePolicyDefault Default write policy used in batch operate commands. Write policy fields include generation, expiration, durableDelete, etc...
(Inherited from AerospikeClient)
infoPolicyDefault Default info policy that is used when info command policy is null.
(Inherited from AerospikeClient)
queryPolicyDefault Default query policy that is used when query command policy is null.
(Inherited from AerospikeClient)
readPolicyDefault Default read policy that is used when read command policy is null.
(Inherited from AerospikeClient)
scanPolicyDefault Default scan policy that is used when scan command policy is null.
(Inherited from AerospikeClient)
writePolicyDefault Default write policy that is used when write command policy is null.
(Inherited from AerospikeClient)

See Also