Class BatchPolicy
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Allow batch to be processed immediately in the server's receiving thread for in-memory namespaces.boolean
Allow batch to be processed immediately in the server's receiving thread for SSD namespaces.boolean
Should all batch keys be attempted regardless of errors.boolean
Deprecated.Fields inherited from class com.aerospike.client.policy.Policy
compress, connectTimeout, failOnFilteredOut, filterExp, maxRetries, readModeAP, readModeSC, replica, sendKey, sleepBetweenRetries, socketTimeout, timeoutDelay, totalTimeout
-
Constructor Summary
ConstructorDescriptionDefault constructor.BatchPolicy
(BatchPolicy other) Copy batch policy from another batch policy.BatchPolicy
(Policy other) Copy batch policy from another policy. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchPolicy
Default batch read policy.void
setAllowInline
(boolean allowInline) void
setAllowInlineSSD
(boolean allowInlineSSD) void
setRespondAllKeys
(boolean respondAllKeys) static BatchPolicy
Default batch write policy.Methods inherited from class com.aerospike.client.policy.Policy
equals, hashCode, setCompress, setConnectTimeout, setFailOnFilteredOut, setFilterExp, setMaxRetries, setReadModeAP, setReadModeSC, setReplica, setSendKey, setSleepBetweenRetries, setSocketTimeout, setTimeout, setTimeoutDelay, setTimeouts, setTotalTimeout
-
Field Details
-
allowInline
public boolean allowInlineAllow batch to be processed immediately in the server's receiving thread for in-memory namespaces. If false, the batch will always be processed in separate service threads.For batch transactions with smaller sized records (<= 1K per record), inline processing will be significantly faster on in-memory namespaces.
Inline processing can introduce the possibility of unfairness because the server can process the entire batch before moving onto the next command.
Default: true
-
allowInlineSSD
public boolean allowInlineSSDAllow batch to be processed immediately in the server's receiving thread for SSD namespaces. If false, the batch will always be processed in separate service threads. Server versions < 6.0 ignore this field.Inline processing can introduce the possibility of unfairness because the server can process the entire batch before moving onto the next command.
Default: false
-
respondAllKeys
public boolean respondAllKeysShould all batch keys be attempted regardless of errors. This field is used on both the client and server. The client handles node specific errors and the server handles key specific errors.If true, every batch key is attempted regardless of previous key specific errors. Node specific errors such as timeouts stop keys to that node, but keys directed at other nodes will continue to be processed.
If false, the server will stop the batch to its node on most key specific errors. The exceptions are
ResultCode.KEY_NOT_FOUND_ERROR
andResultCode.FILTERED_OUT
which never stop the batch.Server versions < 6.0 do not support this field and treat this value as false for key specific errors.
Default: true
-
sendSetName
Deprecated.This method is deprecated and will eventually be removed. The set name is now always sent for every distinct namespace/set in the batch.Send set name field to server for every key in the batch for batch index protocol. This is necessary for batch writes and batch reads when authentication is enabled and security roles are defined on a per set basis.
Default: false
-
-
Constructor Details
-
BatchPolicy
Copy batch policy from another batch policy. -
BatchPolicy
Copy batch policy from another policy. -
BatchPolicy
public BatchPolicy()Default constructor.
-
-
Method Details
-
ReadDefault
Default batch read policy. -
WriteDefault
Default batch write policy. -
setAllowInline
public void setAllowInline(boolean allowInline) -
setAllowInlineSSD
public void setAllowInlineSSD(boolean allowInlineSSD) -
setRespondAllKeys
public void setRespondAllKeys(boolean respondAllKeys)
-