com.aerospike.client.large
Class LargeList

java.lang.Object
  extended by com.aerospike.client.large.LargeList

public final class LargeList
extends Object

Create and manage a list within a single bin.


Constructor Summary
LargeList(AerospikeClient client, Policy policy, Key key, String binName, String userModule)
          Initialize large list operator.
 
Method Summary
 void add(Value... values)
          Add values to the list.
 void add(Value value)
          Add a value to the list.
 void destroy()
          Delete bin containing the list.
 List<?> filter(String filterName, Value... filterArgs)
          Select values from list and apply specified Lua filter.
 List<?> find(Value value)
          Select values from list.
 List<?> findThenFilter(Value value, String filterName, Value... filterArgs)
          Select values from list and apply specified Lua filter.
 int getCapacity()
          Return maximum number of entries in the list.
 Map<?,?> getConfig()
          Return map of list configuration parameters.
 void remove(Value value)
          Delete value from list.
 List<?> scan()
          Return all objects in the list.
 void setCapacity(int capacity)
          Set maximum number of entries in the list.
 int size()
          Return size of list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LargeList

public LargeList(AerospikeClient client,
                 Policy policy,
                 Key key,
                 String binName,
                 String userModule)
Initialize large list operator.

Parameters:
client - client
policy - generic configuration parameters, pass in null for defaults
key - unique record identifier
binName - bin name
userModule - Lua function name that initializes list configuration parameters, pass null for default list
Method Detail

add

public final void add(Value value)
               throws AerospikeException
Add a value to the list. If the list does not exist, create it using specified userModule configuration.

Parameters:
value - value to add
Throws:
AerospikeException

add

public final void add(Value... values)
               throws AerospikeException
Add values to the list. If the list does not exist, create it using specified userModule configuration.

Parameters:
values - values to add
Throws:
AerospikeException

remove

public final void remove(Value value)
                  throws AerospikeException
Delete value from list.

Parameters:
value - value to delete
Throws:
AerospikeException

find

public final List<?> find(Value value)
                   throws AerospikeException
Select values from list.

Parameters:
value - value to select
Returns:
list of entries selected
Throws:
AerospikeException

findThenFilter

public final List<?> findThenFilter(Value value,
                                    String filterName,
                                    Value... filterArgs)
                             throws AerospikeException
Select values from list and apply specified Lua filter.

Parameters:
value - value to select
filterName - Lua function name which applies filter to returned list
filterArgs - arguments to Lua function name
Returns:
list of entries selected
Throws:
AerospikeException

scan

public final List<?> scan()
                   throws AerospikeException
Return all objects in the list.

Throws:
AerospikeException

filter

public final List<?> filter(String filterName,
                            Value... filterArgs)
                     throws AerospikeException
Select values from list and apply specified Lua filter.

Parameters:
filterName - Lua function name which applies filter to returned list
filterArgs - arguments to Lua function name
Returns:
list of entries selected
Throws:
AerospikeException

destroy

public final void destroy()
                   throws AerospikeException
Delete bin containing the list.

Throws:
AerospikeException

size

public final int size()
               throws AerospikeException
Return size of list.

Throws:
AerospikeException

getConfig

public final Map<?,?> getConfig()
                         throws AerospikeException
Return map of list configuration parameters.

Throws:
AerospikeException

setCapacity

public final void setCapacity(int capacity)
                       throws AerospikeException
Set maximum number of entries in the list.

Parameters:
capacity - max entries in list
Throws:
AerospikeException

getCapacity

public final int getCapacity()
                      throws AerospikeException
Return maximum number of entries in the list.

Throws:
AerospikeException


Copyright © 2012–2014 Aerospike, Inc. All rights reserved.