Class: Aerospike::NodePartitions
- Inherits:
-
Object
- Object
- Aerospike::NodePartitions
- Defined in:
- lib/aerospike/query/node_partitions.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
-
#parts_full ⇒ Object
Returns the value of attribute parts_full.
-
#parts_partial ⇒ Object
Returns the value of attribute parts_partial.
-
#parts_unavailable ⇒ Object
Returns the value of attribute parts_unavailable.
-
#record_count ⇒ Object
Returns the value of attribute record_count.
-
#record_max ⇒ Object
Returns the value of attribute record_max.
Instance Method Summary collapse
- #add_partition(partition_status) ⇒ Object
-
#initialize(node) ⇒ NodePartitions
constructor
A new instance of NodePartitions.
- #to_s ⇒ Object
Constructor Details
#initialize(node) ⇒ NodePartitions
Returns a new instance of NodePartitions.
22 23 24 25 26 27 28 29 |
# File 'lib/aerospike/query/node_partitions.rb', line 22 def initialize(node) @node= node @parts_full= [] @parts_partial= [] @record_count= 0 @parts_unavailable= 0 @record_max= 0 end |
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node.
20 21 22 |
# File 'lib/aerospike/query/node_partitions.rb', line 20 def node @node end |
#parts_full ⇒ Object
Returns the value of attribute parts_full.
20 21 22 |
# File 'lib/aerospike/query/node_partitions.rb', line 20 def parts_full @parts_full end |
#parts_partial ⇒ Object
Returns the value of attribute parts_partial.
20 21 22 |
# File 'lib/aerospike/query/node_partitions.rb', line 20 def parts_partial @parts_partial end |
#parts_unavailable ⇒ Object
Returns the value of attribute parts_unavailable.
20 21 22 |
# File 'lib/aerospike/query/node_partitions.rb', line 20 def parts_unavailable @parts_unavailable end |
#record_count ⇒ Object
Returns the value of attribute record_count.
20 21 22 |
# File 'lib/aerospike/query/node_partitions.rb', line 20 def record_count @record_count end |
#record_max ⇒ Object
Returns the value of attribute record_max.
20 21 22 |
# File 'lib/aerospike/query/node_partitions.rb', line 20 def record_max @record_max end |
Instance Method Details
#add_partition(partition_status) ⇒ Object
35 36 37 |
# File 'lib/aerospike/query/node_partitions.rb', line 35 def add_partition(partition_status) partition_status.digest.nil? ? @parts_full << partition_status : @parts_partial << partition_status end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/aerospike/query/node_partitions.rb', line 31 def to_s "Node #{@node.inspect}: full: #{@parts_full.length}, partial: #{@parts_partial.length}" end |