Class: Droonga::Catalog::SingleVolume
- Inherits:
-
Object
- Object
- Droonga::Catalog::SingleVolume
- Defined in:
- lib/droonga/catalog/single_volume.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
- #all_nodes ⇒ Object
- #compute_routes(message, active_nodes) ⇒ Object
-
#initialize(raw) ⇒ SingleVolume
constructor
A new instance of SingleVolume.
- #node ⇒ Object
- #sliced? ⇒ Boolean
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
#address ⇒ Object (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_nodes ⇒ Object
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(, active_nodes) [address.to_s] end |
#node ⇒ Object
27 28 29 |
# File 'lib/droonga/catalog/single_volume.rb', line 27 def node @address.node end |
#sliced? ⇒ Boolean
39 40 41 |
# File 'lib/droonga/catalog/single_volume.rb', line 39 def sliced? false end |