Class: Aerospike::ScanPolicy

Inherits:
BatchPolicy show all
Defined in:
lib/aerospike/policy/scan_policy.rb

Overview

Container object for scan policy command.

Instance Attribute Summary collapse

Attributes inherited from BatchPolicy

#max_concurrent_nodes, #record_queue_size, #wait_until_migrations_are_over

Attributes inherited from Policy

#consistency_level, #max_retries, #priority, #sleep_between_retries, #timeout

Instance Method Summary collapse

Constructor Details

#initialize(opt = {}) ⇒ ScanPolicy

Returns a new instance of ScanPolicy.



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

def initialize(opt={})
  super(opt)

  @scan_percent = opt[:scan_percent] || 100
  @concurrent_nodes = opt[:concurrent_nodes].nil? ? true : concurrent_nodes
  @include_bin_data = opt[:include_bin_data].nil? ? true : include_bin_data
  @fail_on_cluster_change = opt[:fail_on_cluster_change].nil? ? true : fail_on_cluster_change

  @max_retries = 0

  self
end

Instance Attribute Details

#concurrent_nodesObject

Returns the value of attribute concurrent_nodes.



23
24
25
# File 'lib/aerospike/policy/scan_policy.rb', line 23

def concurrent_nodes
  @concurrent_nodes
end

#fail_on_cluster_changeObject

Returns the value of attribute fail_on_cluster_change.



23
24
25
# File 'lib/aerospike/policy/scan_policy.rb', line 23

def fail_on_cluster_change
  @fail_on_cluster_change
end

#include_bin_dataObject

Returns the value of attribute include_bin_data.



23
24
25
# File 'lib/aerospike/policy/scan_policy.rb', line 23

def include_bin_data
  @include_bin_data
end

#scan_percentObject

Returns the value of attribute scan_percent.



23
24
25
# File 'lib/aerospike/policy/scan_policy.rb', line 23

def scan_percent
  @scan_percent
end