Class: Aerospike::ScanPartitionCommand

Inherits:
StreamCommand show all
Defined in:
lib/aerospike/query/scan_partition_command.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from StreamCommand

#parse_group

Methods inherited from MultiCommand

#compressed?, #get_node, #parse_group, #parse_key, #parse_record, #parse_result, #read_bytes, #skip_key, #stop, #valid?

Methods inherited from Command

#execute, #set_delete, #set_exists, #set_operate, #set_query, #set_read, #set_read_for_key_only, #set_read_header, #set_scan, #set_touch, #set_udf, #set_write, #write_bins

Constructor Details

#initialize(cluster, policy, tracker, node_partitions, namespace, set_name, bin_names, recordset) ⇒ ScanPartitionCommand

Returns a new instance of ScanPartitionCommand.



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/aerospike/query/scan_partition_command.rb', line 26

def initialize(cluster, policy, tracker, node_partitions, namespace, set_name, bin_names, recordset)
  super(node_partitions.node)
  @cluster = cluster
  @policy = policy
  @namespace = namespace
  @set_name = set_name
  @bin_names = bin_names
  @recordset = recordset
  @node_partitions = node_partitions
  @tracker = tracker
end

Instance Method Details

#should_retry(e) ⇒ Object



42
43
44
45
# File 'lib/aerospike/query/scan_partition_command.rb', line 42

def should_retry(e)
  # !! converts nil to false
  !!@tracker&.should_retry(@node_partitions, e)
end

#write_bufferObject



38
39
40
# File 'lib/aerospike/query/scan_partition_command.rb', line 38

def write_buffer
  set_scan(@cluster, @policy, @namespace, @set_name, @bin_names, @node_partitions)
end