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.
Namespace: Aerospike.Client
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 5.1.1.0 (5.1.1)
Syntax
C#
void Query( QueryPolicy policy, Statement statement, PartitionFilter partitionFilter, QueryListener listener )
Parameters
- policy
- Type: Aerospike.ClientQueryPolicy
query configuration parameters, pass in null for defaults - statement
- Type: Aerospike.ClientStatement
query definition - partitionFilter
- Type: Aerospike.ClientPartitionFilter
data partition filter. Set to All for all partitions. - listener
- Type: Aerospike.ClientQueryListener
where to send results
Exceptions
Exception | Condition |
---|---|
AerospikeException | if query fails |
See Also