Class: Droonga::Catalog::SingleVolume

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/catalog/single_volume.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ SingleVolume

Returns a new instance of SingleVolume.



22
23
24
25
# File 'lib/droonga/catalog/single_volume.rb', line 22

def initialize(raw)
  @raw = raw
  @address = Address.parse(@raw["address"])
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



21
22
23
# File 'lib/droonga/catalog/single_volume.rb', line 21

def address
  @address
end

Instance Method Details

#all_nodesObject



31
32
33
# File 'lib/droonga/catalog/single_volume.rb', line 31

def all_nodes
  @all_nodes ||= [node]
end

#compute_routes(message, active_nodes) ⇒ Object



35
36
37
# File 'lib/droonga/catalog/single_volume.rb', line 35

def compute_routes(message, active_nodes)
  [address.to_s]
end

#nodeObject



27
28
29
# File 'lib/droonga/catalog/single_volume.rb', line 27

def node
  @address.node
end

#sliced?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/droonga/catalog/single_volume.rb', line 39

def sliced?
  false
end