Class: Aerospike::Operation
- Inherits:
-
Object
- Object
- Aerospike::Operation
- Defined in:
- lib/aerospike/operation.rb
Constant Summary collapse
- READ =
1- READ_HEADER =
1- WRITE =
2- ADD =
5- APPEND =
9- PREPEND =
10- TOUCH =
11
Instance Attribute Summary collapse
-
#bin_name ⇒ Object
readonly
Returns the value of attribute bin_name.
-
#bin_value ⇒ Object
readonly
Returns the value of attribute bin_value.
-
#op_type ⇒ Object
readonly
Returns the value of attribute op_type.
Class Method Summary collapse
- .add(bin) ⇒ Object
- .append(bin) ⇒ Object
- .get(bin_name = nil) ⇒ Object
- .get_header(bin_name = nil) ⇒ Object
- .prepend(bin) ⇒ Object
- .put(bin) ⇒ Object
- .touch ⇒ Object
Instance Method Summary collapse
-
#initialize(op_type, bin_name = nil, bin_value = NullValue.new) ⇒ Operation
constructor
A new instance of Operation.
Constructor Details
#initialize(op_type, bin_name = nil, bin_value = NullValue.new) ⇒ Operation
Returns a new instance of Operation.
33 34 35 36 37 38 |
# File 'lib/aerospike/operation.rb', line 33 def initialize(op_type, bin_name=nil, bin_value=NullValue.new) @op_type = op_type @bin_name = bin_name @bin_value = Value.of(bin_value) self end |
Instance Attribute Details
#bin_name ⇒ Object (readonly)
Returns the value of attribute bin_name.
23 24 25 |
# File 'lib/aerospike/operation.rb', line 23 def bin_name @bin_name end |
#bin_value ⇒ Object (readonly)
Returns the value of attribute bin_value.
23 24 25 |
# File 'lib/aerospike/operation.rb', line 23 def bin_value @bin_value end |
#op_type ⇒ Object (readonly)
Returns the value of attribute op_type.
23 24 25 |
# File 'lib/aerospike/operation.rb', line 23 def op_type @op_type end |
Class Method Details
.add(bin) ⇒ Object
60 61 62 |
# File 'lib/aerospike/operation.rb', line 60 def self.add(bin) Operation.new(ADD, bin.name, bin.value) end |
.append(bin) ⇒ Object
52 53 54 |
# File 'lib/aerospike/operation.rb', line 52 def self.append(bin) Operation.new(APPEND, bin.name, bin.value) end |
.get(bin_name = nil) ⇒ Object
40 41 42 |
# File 'lib/aerospike/operation.rb', line 40 def self.get(bin_name=nil) Operation.new(READ, bin_name) end |
.get_header(bin_name = nil) ⇒ Object
44 45 46 |
# File 'lib/aerospike/operation.rb', line 44 def self.get_header(bin_name=nil) Operation.new(READ_HEADER, bin_name) end |
.prepend(bin) ⇒ Object
56 57 58 |
# File 'lib/aerospike/operation.rb', line 56 def self.prepend(bin) Operation.new(PREPEND, bin.name, bin.value) end |