class Aerospike::BatchUDFPolicy
Attributes
commit_level[RW]
durable_delete[RW]
expiration[RW]
expiration=[RW]
filter_exp[RW]
send_key[RW]
ttl[RW]
Public Class Methods
new(opt={})
click to toggle source
# File lib/aerospike/policy/batch_udf_policy.rb, line 28 def initialize(opt={}) # Optional expression filter. If filter_exp exists and evaluates to false, the specific batch key # request is not performed and {BatchRecord#resultCode} is set to # {ResultCode#FILTERED_OUT}. # # If exists, this filter overrides the batch parent filter {Policy#filter_exp} # for the specific key in batch commands that allow a different policy per key. # Otherwise, this filter is ignored. # # Default: nil @filter_exp = opt[:filter_exp] # Desired consistency guarantee when committing a transaction 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 @commit_level = opt.fetch(:commit_level, CommitLevel::COMMIT_ALL) # Record expiration; also known as time-to-live (TTL). # Seconds record will live before being removed by the server. # # Supported values: # - `Aerospike::TTL::NEVER_EXPIRE`: Never expire record; requires Aerospike 2 # server versions >= 2.7.2 or Aerospike 3 server versions >= 3.1.4. Do # not use for older servers. # - `Aerospike::TTL::NAMESPACE_DEFAULT`: Default to namespace configuration # variable "default-ttl" on the server. # - `Aerospike::TTL::DONT_UPDATE`: Do not change a record's expiration date # when updating the record. Requires Aerospike server v3.10.1 or later. # - Any value > 0: Actual time-to-live in seconds. @ttl = opt[:ttl] || opt[:expiration] || 0 # If the transaction 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). @durable_delete = opt.fetch(:durable_delete, false) # Send user defined key in addition to hash digest. # If true, the key will be stored with the record on the server. # # Default: false (do not send the user defined key) @send_key = opt.fetch(:send_key, false) end