Package com.aerospike.client.policy
Class BatchUDFPolicy
java.lang.Object
com.aerospike.client.policy.BatchUDFPolicy
Policy attributes used in batch UDF execute commands.
-
Field Summary
FieldsModifier and TypeFieldDescriptionDesired consistency guarantee when committing a command on the server.booleanIf the command results in a record deletion, leave a tombstone for the record.intRecord expiration.Optional expression filter.booleanExecute the write command only if the record is not already locked by this transaction.booleanSend user defined key in addition to hash digest. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.BatchUDFPolicy(BatchUDFPolicy other) Copy constructor.BatchUDFPolicy(BatchUDFPolicy other, com.aerospike.client.configuration.ConfigurationProvider configProvider) Copy policy from another policy AND override certain policy attributes if they exist in the configProvider.BatchUDFPolicy(BatchUDFPolicy other, com.aerospike.client.configuration.ConfigurationProvider configProvider, boolean isDefaultPolicy) Copy policy from another policy AND override certain policy attributes if they exist in the configProvider. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCommitLevel(CommitLevel commitLevel) voidsetDurableDelete(boolean durableDelete) voidsetExpiration(int expiration) voidsetFilterExp(Expression filterExp) voidsetOnLockingOnly(boolean onLockingOnly) voidsetSendKey(boolean sendKey)
-
Field Details
-
filterExp
Optional expression filter. If filterExp exists and evaluates to false, the specific batch key request is not performed andBatchRecord.resultCodeis set toResultCode.FILTERED_OUT.If exists, this filter overrides the batch parent filter
Policy.filterExpfor the specific key in batch commands that allow a different policy per key. Otherwise, this filter is ignored.Default: null
-
commitLevel
Desired consistency guarantee when committing a command on the server. The default (COMMIT_ALL) indicates that the server should wait for master and all replica commits to be successful before returning success to the client.Default: CommitLevel.COMMIT_ALL
-
expiration
public int expirationRecord expiration. Also known as ttl (time to live). Seconds record will live before being removed by the server.Expiration values:
- -2: Do not change ttl when record is updated.
- -1: Never expire.
- 0: Default to namespace configuration variable "default-ttl" on the server.
- > 0: Actual ttl in seconds.
Default: 0
-
durableDelete
public boolean durableDeleteIf the command results in a record deletion, leave a tombstone for the record. This prevents deleted records from reappearing after node failures. Valid for Aerospike Server Enterprise Edition only.Default: false (do not tombstone deleted records).
-
onLockingOnly
public boolean onLockingOnlyExecute the write command only if the record is not already locked by this transaction. If this field is true and the record is already locked by this transaction, the command will throw an exception with theResultCode.MRT_ALREADY_LOCKEDerror code.This field is useful for safely retrying non-idempotent writes as an alternative to simply aborting the transaction.
Default: false.
-
sendKey
public boolean sendKeySend user defined key in addition to hash digest. If true and the UDF writes a record, the key will be stored with the record on the server.Default: false (do not send the user defined key)
-
-
Constructor Details
-
BatchUDFPolicy
public BatchUDFPolicy(BatchUDFPolicy other, com.aerospike.client.configuration.ConfigurationProvider configProvider) Copy policy from another policy AND override certain policy attributes if they exist in the configProvider. Any policy overrides will not get logged. -
BatchUDFPolicy
public BatchUDFPolicy(BatchUDFPolicy other, com.aerospike.client.configuration.ConfigurationProvider configProvider, boolean isDefaultPolicy) Copy policy from another policy AND override certain policy attributes if they exist in the configProvider. Any default policy overrides will get logged. -
BatchUDFPolicy
Copy constructor. -
BatchUDFPolicy
public BatchUDFPolicy()Default constructor.
-
-
Method Details
-
setFilterExp
-
setCommitLevel
-
setExpiration
public void setExpiration(int expiration) -
setDurableDelete
public void setDurableDelete(boolean durableDelete) -
setOnLockingOnly
public void setOnLockingOnly(boolean onLockingOnly) -
setSendKey
public void setSendKey(boolean sendKey)
-