Class: Aerospike::Large

Inherits:
Object
  • Object
show all
Defined in:
lib/aerospike/ldt/large.rb

Direct Known Subclasses

LargeList, LargeMap, LargeSet, LargeStack

Instance Method Summary collapse

Constructor Details

#initialize(client, policy, key, bin_name, user_module = nil) ⇒ Large

Returns a new instance of Large.



25
26
27
28
29
30
31
32
33
# File 'lib/aerospike/ldt/large.rb', line 25

def initialize(client, policy, key, bin_name, user_module=nil)
  @client = client
  @policy = policy
  @key = key
  @bin_name = bin_name
  @user_module = user_module unless user_module.nil?

  self
end

Instance Method Details

#configObject

Return map of object configuration parameters.



46
47
48
# File 'lib/aerospike/ldt/large.rb', line 46

def config
  @client.execute_udf(@key, @PACKAGE_NAME, 'get_config', [@bin_name], @policy)
end

#destroyObject

Delete bin containing the object.



36
37
38
# File 'lib/aerospike/ldt/large.rb', line 36

def destroy
  @client.execute_udf(@key, @PACKAGE_NAME, 'destroy', [@bin_name], @policy)
end

#scanObject

Return list of all objects on the stack.



51
52
53
# File 'lib/aerospike/ldt/large.rb', line 51

def scan
  @client.execute_udf(@key, @PACKAGE_NAME, 'scan', [@bin_name], @policy)
end

#sizeObject

Return size of object.



41
42
43
# File 'lib/aerospike/ldt/large.rb', line 41

def size
  @client.execute_udf(@key, @PACKAGE_NAME, 'size', [@bin_name], @policy)
end