Method: Aerospike::BatchWrite#initialize
- Defined in:
- lib/aerospike/batch_write.rb
#initialize(key, ops, opt = {}) ⇒ BatchWrite
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.
37 38 39 40 41 |
# 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 |