QueryPolicy Class

Query policy attributes used by queries. Query requests are send completely using proto buffers and hence include all policy attributes.

Definition

Namespace: Aerospike.Client.KVS
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 7.0.0
C#
public sealed class QueryPolicy : IMessage<QueryPolicy>, 
	IMessage, IEquatable<QueryPolicy>, IDeepCloneable<QueryPolicy>, 
	IBufferMessage
Inheritance
Object    QueryPolicy
Implements
IBufferMessage, IDeepCloneableQueryPolicy, IMessage, IMessageQueryPolicy, IEquatableQueryPolicy

Constructors

QueryPolicyInitializes a new instance of the QueryPolicy class
QueryPolicy(QueryPolicy)Initializes a new instance of the QueryPolicy class

Properties

Compress Use zlib compression on command buffers sent to the server and responses received from the server when the buffer size is greater than 128 bytes. This option will increase cpu and memory usage (for extra compressed buffers),but decrease the size of data sent over the network.
Descriptor 
Expression Optional expression filter. If filterExp exists and evaluates to false, the transaction is ignored.
FailOnClusterChange Terminate query if cluster is in migration state. If the server supports partition queries or the query filter is null (scan), this field is ignored. Default: false
HasExpressionGets whether the "expression" field is set
HasFailOnClusterChangeGets whether the "failOnClusterChange" field is set
HasIncludeBinDataGets whether the "includeBinData" field is set
HasInfoTimeoutGets whether the "infoTimeout" field is set
HasMaxConcurrentNodesGets whether the "maxConcurrentNodes" field is set
HasRecordQueueSizeGets whether the "recordQueueSize" field is set
HasSendKeyGets whether the "sendKey" field is set
HasShortQueryGets whether the "shortQuery" field is set
HasTotalTimeoutGets whether the "totalTimeout" field is set
IncludeBinData Should bin data be retrieved. If false, only record digests (and user keys if stored on the server) are retrieved. Default: true
InfoTimeout Timeout in milliseconds for "cluster-stable" info command that is run when failOnClusterChange is true and server version is less than 6.0. Default: 1000
MaxConcurrentNodes Maximum number of concurrent requests to server nodes at any point in time. If there are 16 nodes in the cluster and maxConcurrentNodes is 8, then queries will be made to 8 nodes in parallel. When a query completes, a new query will be issued until all 16 nodes have been queried. Default: 0 (issue requests to all server nodes in parallel)
Parser 
ReadModeAP Read policy for SC (strong consistency) namespaces.
ReadModeSC Replica algorithm used to determine the target node for a single record command. Scan and query are not affected by replica algorithms.
RecordQueueSize Number of records to place in queue before blocking. Records received from multiple server nodes will be placed in a queue. A separate thread consumes these records in parallel. If the queue is full, the producer threads will block until records are consumed. Default: 5000
Replica Read policy for AP (availability) namespaces.
SendKey Send user defined key in addition to hash digest on both reads and writes. If the key is sent on a write, the key will be stored with the record on the server. Default: false (do not send the user defined key)
ShortQuery Is query expected to return less than 100 records per node. If true, the server will optimize the query for a small record set. This field is ignored for aggregation queries, background queries and server versions &lt; 6.0. Default: false
TotalTimeout Total transaction timeout in milliseconds. Default for all other commands: 1000ms

Methods

CalculateSize 
ClearExpressionClears the value of the "expression" field
ClearFailOnClusterChangeClears the value of the "failOnClusterChange" field
ClearIncludeBinDataClears the value of the "includeBinData" field
ClearInfoTimeoutClears the value of the "infoTimeout" field
ClearMaxConcurrentNodesClears the value of the "maxConcurrentNodes" field
ClearRecordQueueSizeClears the value of the "recordQueueSize" field
ClearSendKeyClears the value of the "sendKey" field
ClearShortQueryClears the value of the "shortQuery" field
ClearTotalTimeoutClears the value of the "totalTimeout" field
Clone 
Equals(Object)
(Overrides ObjectEquals(Object))
Equals(QueryPolicy) 
GetHashCode
(Overrides ObjectGetHashCode)
MergeFrom(CodedInputStream) 
MergeFrom(QueryPolicy) 
ToString
(Overrides ObjectToString)
WriteTo 

Fields

CompressFieldNumberField number for the "compress" field.
ExpressionFieldNumberField number for the "expression" field.
FailOnClusterChangeFieldNumberField number for the "failOnClusterChange" field.
IncludeBinDataFieldNumberField number for the "includeBinData" field.
InfoTimeoutFieldNumberField number for the "infoTimeout" field.
MaxConcurrentNodesFieldNumberField number for the "maxConcurrentNodes" field.
ReadModeAPFieldNumberField number for the "readModeAP" field.
ReadModeSCFieldNumberField number for the "readModeSC" field.
RecordQueueSizeFieldNumberField number for the "recordQueueSize" field.
ReplicaFieldNumberField number for the "replica" field.
SendKeyFieldNumberField number for the "sendKey" field.
ShortQueryFieldNumberField number for the "shortQuery" field.
TotalTimeoutFieldNumberField number for the "totalTimeout" field.

See Also