Class: Riak::Client::Node
- Includes:
- Util::Escape, Util::Translation
- Defined in:
- lib/riak/client/node.rb
Constant Summary collapse
- VALID_OPTIONS =
[:host, :pb_port]
- ERRORS_DECAY_RATE =
For a score which halves in 10 seconds, choose ln(1/2)/10
Math.log(0.5)/10
Instance Attribute Summary collapse
-
#error_rate ⇒ Object
readonly
A Decaying rate of errors.
-
#host ⇒ Object
What IP address or hostname does this node listen on?.
-
#pb_port ⇒ Object
Which port does the protocol buffers interface listen on?.
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(client, opts = {}) ⇒ Node
constructor
A new instance of Node.
- #inspect ⇒ Object
-
#protobuffs? ⇒ Boolean
Can this node be used for protocol buffers requests?.
Methods included from Util::Escape
#escape, #maybe_escape, #maybe_unescape, #unescape
Methods included from Util::Translation
Constructor Details
Instance Attribute Details
#error_rate ⇒ Object (readonly)
A Decaying rate of errors.
22 23 24 |
# File 'lib/riak/client/node.rb', line 22 def error_rate @error_rate end |
#host ⇒ Object
What IP address or hostname does this node listen on?
16 17 18 |
# File 'lib/riak/client/node.rb', line 16 def host @host end |
#pb_port ⇒ Object
Which port does the protocol buffers interface listen on?
19 20 21 |
# File 'lib/riak/client/node.rb', line 19 def pb_port @pb_port end |
Instance Method Details
#==(o) ⇒ Object
32 33 34 35 36 |
# File 'lib/riak/client/node.rb', line 32 def ==(o) o.kind_of? Node and @host == o.host and @pb_port == o.pb_port end |
#inspect ⇒ Object
44 45 46 |
# File 'lib/riak/client/node.rb', line 44 def inspect "#<Node #{@host}:#{@pb_port}>" end |
#protobuffs? ⇒ Boolean
Can this node be used for protocol buffers requests?
39 40 41 42 |
# File 'lib/riak/client/node.rb', line 39 def protobuffs? # TODO: Need to sort out capabilities true end |