class Aerospike::BatchWrite

Batch key and read/write operations with write policy.

Constants

DEFAULT_BATCH_WRITE_POLICY

Attributes

ops[RW]

Required operations for this key.

policy[RW]

Optional write policy.

Public Class Methods

new(key, ops, opt = {}) click to toggle source

Initialize batch key and read/write operations.

{Operation#get()} is not allowed because it returns a variable number of bins and makes it difficult (sometimes impossible) to lineup operations with results. Instead, use {Operation#get(bin_name)} for each bin name.

Calls superclass method Aerospike::BatchRecord::new
# File lib/aerospike/batch_write.rb, line 37
def initialize(key, ops, opt = {})
  super(key, has_write: true)
  @policy = BatchRecord.create_policy(opt, BatchWritePolicy, DEFAULT_BATCH_WRITE_POLICY)
  @ops = ops
end