Class: Aerospike::CDT::MapPolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/aerospike/cdt/map_policy.rb

Constant Summary collapse

DEFAULT =
MapPolicy.new

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#flagsObject

Returns the value of attribute flags.



21
22
23
# File 'lib/aerospike/cdt/map_policy.rb', line 21

def flags
  @flags
end

#orderObject

Returns the value of attribute order.



21
22
23
# File 'lib/aerospike/cdt/map_policy.rb', line 21

def order
  @order
end

#write_modeObject

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