public class LargeList extends Object
Constructor and Description |
---|
LargeList(AerospikeClient client,
WritePolicy policy,
Key key,
String binName,
String createModule)
Initialize large list operator.
|
Modifier and Type | Method and Description |
---|---|
void |
add(List<?> values)
Add values to the list.
|
void |
add(Value... values)
Add values to list.
|
void |
add(Value value)
Add value to list.
|
void |
destroy()
Delete bin containing the list.
|
List<?> |
filter(String filterModule,
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 filterModule,
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.
|
List<?> |
range(Value begin,
Value end)
Select a range of values from the large list.
|
List<?> |
range(Value begin,
Value end,
String filterModule,
String filterName,
Value... filterArgs)
Select a range of values from the large list, then apply a Lua filter.
|
void |
remove(List<?> values)
Delete values from list.
|
void |
remove(Value value)
Delete value from list.
|
int |
remove(Value begin,
Value end)
Delete values from list between range.
|
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.
|
void |
update(List<?> values)
Update/Add each value in values list depending if key exists or not.
|
void |
update(Value... values)
Update/Add each value in array depending if key exists or not.
|
void |
update(Value value)
Update value in list if key exists.
|
public LargeList(AerospikeClient client, WritePolicy policy, Key key, String binName, String createModule)
client
- clientpolicy
- generic configuration parameters, pass in null for defaultskey
- unique record identifierbinName
- bin namecreateModule
- Lua function name that initializes list configuration parameters, pass null for default listpublic void add(Value value) throws AerospikeException
value
- value to addAerospikeException
public void add(Value... values) throws AerospikeException
values
- values to addAerospikeException
public void add(List<?> values) throws AerospikeException
values
- values to addAerospikeException
public void update(Value value) throws AerospikeException
value
- value to updateAerospikeException
public void update(Value... values) throws AerospikeException
values
- values to updateAerospikeException
public void update(List<?> values) throws AerospikeException
values
- values to updateAerospikeException
public void remove(Value value) throws AerospikeException
value
- value to deleteAerospikeException
public void remove(List<?> values) throws AerospikeException
values
- values to deleteAerospikeException
public int remove(Value begin, Value end) throws AerospikeException
begin
- low value of the range (inclusive)end
- high value of the range (inclusive)AerospikeException
public List<?> find(Value value) throws AerospikeException
value
- value to selectAerospikeException
public List<?> findThenFilter(Value value, String filterModule, String filterName, Value... filterArgs) throws AerospikeException
value
- value to selectfilterModule
- Lua module name which contains filter functionfilterName
- Lua function name which applies filter to returned listfilterArgs
- arguments to Lua function nameAerospikeException
public List<?> range(Value begin, Value end) throws AerospikeException
begin
- low value of the range (inclusive)end
- high value of the range (inclusive)AerospikeException
public List<?> range(Value begin, Value end, String filterModule, String filterName, Value... filterArgs) throws AerospikeException
begin
- low value of the range (inclusive)end
- high value of the range (inclusive)filterModule
- Lua module name which contains filter functionfilterName
- Lua function name which applies filter to returned listfilterArgs
- arguments to Lua function nameAerospikeException
public List<?> scan() throws AerospikeException
AerospikeException
public List<?> filter(String filterModule, String filterName, Value... filterArgs) throws AerospikeException
filterModule
- Lua module name which contains filter functionfilterName
- Lua function name which applies filter to returned listfilterArgs
- arguments to Lua function nameAerospikeException
public void destroy() throws AerospikeException
AerospikeException
public int size() throws AerospikeException
AerospikeException
public Map<?,?> getConfig() throws AerospikeException
AerospikeException
public void setCapacity(int capacity) throws AerospikeException
capacity
- max entries in listAerospikeException
public int getCapacity() throws AerospikeException
AerospikeException
Copyright © 2012–2015 Aerospike, Inc. All rights reserved.