Class: Aerospike::CDT::MapPolicy
- Inherits:
-
Object
- Object
- Aerospike::CDT::MapPolicy
- Defined in:
- lib/aerospike/cdt/map_policy.rb
Constant Summary collapse
- DEFAULT =
MapPolicy.new
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#order ⇒ Object
Returns the value of attribute order.
-
#write_mode ⇒ Object
Returns the value of attribute write_mode.
Instance Method Summary collapse
-
#initialize(order: nil, write_mode: nil, flags: nil) ⇒ MapPolicy
constructor
A new instance of MapPolicy.
Constructor Details
#initialize(order: nil, write_mode: nil, flags: nil) ⇒ MapPolicy
Returns a new instance of MapPolicy.
23 24 25 26 27 28 29 30 31 |
# File 'lib/aerospike/cdt/map_policy.rb', line 23 def initialize(order: nil, write_mode: nil, flags: nil) if write_mode && flags raise ArgumentError, "Use write mode for server versions < 4.3; use write flags for server versions >= 4.3." end @order = order || MapOrder::DEFAULT @write_mode = write_mode || MapWriteMode::DEFAULT @flags = flags || MapWriteFlags::DEFAULT end |
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags.
21 22 23 |
# File 'lib/aerospike/cdt/map_policy.rb', line 21 def flags @flags end |
#order ⇒ Object
Returns the value of attribute order.
21 22 23 |
# File 'lib/aerospike/cdt/map_policy.rb', line 21 def order @order end |
#write_mode ⇒ Object
Returns the value of attribute write_mode.
21 22 23 |
# File 'lib/aerospike/cdt/map_policy.rb', line 21 def write_mode @write_mode end |