Class: Aerospike::Large
- Inherits:
-
Object
- Object
- Aerospike::Large
- Defined in:
- lib/aerospike/ldt/large.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#capacity ⇒ Object
Return maximum number of entries in the object.
-
#capacity=(capacity) ⇒ Object
Set maximum number of entries in the object.
-
#config ⇒ Object
Return map of object configuration parameters.
-
#destroy ⇒ Object
Delete bin containing the object.
-
#initialize(client, policy, key, bin_name, user_module = nil) ⇒ Large
constructor
A new instance of Large.
-
#scan ⇒ Object
Return list of all objects on the stack.
-
#size ⇒ Object
Return size of object.
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
#capacity ⇒ Object
Return maximum number of entries in the object.
58 59 60 |
# File 'lib/aerospike/ldt/large.rb', line 58 def capacity @client.execute_udf(@key, @PACKAGE_NAME, 'get_capacity', [@bin_name], @policy) end |
#capacity=(capacity) ⇒ Object
Set maximum number of entries in the object.
capacity max entries in set
53 54 55 |
# File 'lib/aerospike/ldt/large.rb', line 53 def capacity=(capacity) @client.execute_udf(@key, @PACKAGE_NAME, 'set_capacity', [@bin_name, capacity], @policy) end |
#config ⇒ Object
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 |
#destroy ⇒ Object
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 |
#scan ⇒ Object
Return list of all objects on the stack.
63 64 65 |
# File 'lib/aerospike/ldt/large.rb', line 63 def scan @client.execute_udf(@key, @PACKAGE_NAME, 'scan', [@bin_name], @policy) end |
#size ⇒ Object
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 |