Class BatchPolicy
- Direct Known Subclasses:
TxnRollPolicy,TxnVerifyPolicy
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanAllow batch to be processed immediately in the server's receiving thread for in-memory namespaces.booleanAllow batch to be processed immediately in the server's receiving thread for SSD namespaces.intDeprecated.booleanShould all batch keys be attempted regardless of errors.booleanDeprecated.Fields inherited from class com.aerospike.client.policy.Policy
compress, connectTimeout, failOnFilteredOut, filterExp, maxRetries, readModeAP, readModeSC, readTouchTtlPercent, replica, sendKey, sleepBetweenRetries, socketTimeout, timeoutDelay, totalTimeout, txn -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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 BatchPolicyDefault batch read policy.voidsetAllowInline(boolean allowInline) voidsetAllowInlineSSD(boolean allowInlineSSD) voidsetMaxConcurrentThreads(int maxConcurrentThreads) voidsetRespondAllKeys(boolean respondAllKeys) static BatchPolicyDefault batch write policy.Methods inherited from class com.aerospike.client.policy.Policy
equals, hashCode, setCompress, setConnectTimeout, setFailOnFilteredOut, setFilterExp, setMaxRetries, setReadModeAP, setReadModeSC, setReadTouchTtlPercent, setReplica, setSendKey, setSleepBetweenRetries, setSocketTimeout, setTimeout, setTimeoutDelay, setTimeouts, setTotalTimeout, setTxn
-
Field Details
-
maxConcurrentThreads
Deprecated.This field is ignored and deprecated. Sync batch node commands are now always issued using virtual threads in parallel. Async batch node commands always ignored this field. This field only exists to maintain api compatibility when switching between aerospike-client-jdk21 and aerospike-client-jdk8 packages. -
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 commands 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_ERRORandResultCode.FILTERED_OUTwhich 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. -
setMaxConcurrentThreads
public void setMaxConcurrentThreads(int maxConcurrentThreads) -
setAllowInline
public void setAllowInline(boolean allowInline) -
setAllowInlineSSD
public void setAllowInlineSSD(boolean allowInlineSSD) -
setRespondAllKeys
public void setRespondAllKeys(boolean respondAllKeys)
-