Class: Riak::Client::ProtobuffsBackend
- Inherits:
-
Object
- Object
- Riak::Client::ProtobuffsBackend
- Includes:
- Util::Translation
- Defined in:
- riak-client/lib/riak/client/protobuffs_backend.rb
Constant Summary
- MESSAGE_CODES =
Message Codes Enum
ErrorResp PingReq PingResp GetClientIdReq GetClientIdResp SetClientIdReq SetClientIdResp GetServerInfoReq GetServerInfoResp GetReq GetResp PutReq PutResp DelReq DelResp ListBucketsReq ListBucketsResp ListKeysReq ListKeysResp GetBucketReq GetBucketResp SetBucketReq SetBucketResp MapRedReq MapRedResp ].map {|s| s.intern }.freeze- UINTMAX =
0xffffffff- QUORUMS =
{ "one" => UINTMAX - 1, "quorum" => UINTMAX - 2, "all" => UINTMAX - 3, "default" => UINTMAX - 4 }.freeze
Instance Attribute Summary (collapse)
-
- (Object) client
Returns the value of attribute client.
Class Method Summary (collapse)
Instance Method Summary (collapse)
-
- (ProtobuffsBackend) initialize(client)
constructor
A new instance of ProtobuffsBackend.
Methods included from Util::Translation
Constructor Details
- (ProtobuffsBackend) initialize(client)
A new instance of ProtobuffsBackend
62 63 64 |
# File 'riak-client/lib/riak/client/protobuffs_backend.rb', line 62 def initialize(client) @client = client end |
Instance Attribute Details
- (Object) client
Returns the value of attribute client
61 62 63 |
# File 'riak-client/lib/riak/client/protobuffs_backend.rb', line 61 def client @client end |
Class Method Details
+ (Object) simple(method, code)
54 55 56 57 58 59 |
# File 'riak-client/lib/riak/client/protobuffs_backend.rb', line 54 def self.simple(method, code) define_method method do socket.write([1, MESSAGE_CODES.index(code)].pack('NC')) decode_response end end |