public class LargeList extends Object
Constructor and Description |
---|
LargeList(AerospikeClient client,
WritePolicy policy,
Key key,
String binName)
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<Boolean> |
exists(List<Value> keyValues)
Do key values exist? Return list of results in one batch call.
|
boolean |
exists(Value keyValue)
Does key value exist?
|
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<?> |
findFirst(int count)
Select values from the beginning of list up to a maximum count.
|
List<?> |
findFirst(int count,
String filterModule,
String filterName,
Value... filterArgs)
Select values from the beginning of list up to a maximum count after applying lua filter.
|
List<?> |
findFrom(Value begin,
int count)
Select values from the begin key up to a maximum count.
|
List<?> |
findFrom(Value begin,
int count,
String filterModule,
String filterName,
Value... filterArgs)
Select values from the begin key up to a maximum count after applying lua filter.
|
List<?> |
findLast(int count)
Select values from the end of list up to a maximum count.
|
List<?> |
findLast(int count,
String filterModule,
String filterName,
Value... filterArgs)
Select values from the end of list up to a maximum count after applying lua filter.
|
List<?> |
findThenFilter(Value value,
String filterModule,
String filterName,
Value... filterArgs)
Select values from list and apply specified Lua filter.
|
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,
int count)
Select a range of values from the large list.
|
List<?> |
range(Value begin,
Value end,
int count,
String filterModule,
String filterName,
Value... filterArgs)
Select a range of values from the large list, then apply a lua filter.
|
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 |
setPageSize(int pageSize)
Set LDT page size.
|
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)
client
- clientpolicy
- generic configuration parameters, pass in null for defaultskey
- unique record identifierbinName
- bin namepublic 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 boolean exists(Value keyValue) throws AerospikeException
keyValue
- key value to lookupAerospikeException
public List<Boolean> exists(List<Value> keyValues) throws AerospikeException
keyValues
- key values to lookupAerospikeException
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<?> findFirst(int count) throws AerospikeException
count
- maximum number of values to returnAerospikeException
public List<?> findFirst(int count, String filterModule, String filterName, Value... filterArgs) throws AerospikeException
count
- maximum number of values to return after applying lua filterfilterModule
- Lua module name which contains filter functionfilterName
- Lua function name which applies filter to returned listfilterArgs
- arguments to Lua function nameAerospikeException
public List<?> findLast(int count) throws AerospikeException
count
- maximum number of values to returnAerospikeException
public List<?> findLast(int count, String filterModule, String filterName, Value... filterArgs) throws AerospikeException
count
- maximum number of values to return after applying lua filterfilterModule
- Lua module name which contains filter functionfilterName
- Lua function name which applies filter to returned listfilterArgs
- arguments to Lua function nameAerospikeException
public List<?> findFrom(Value begin, int count) throws AerospikeException
begin
- start value (inclusive)count
- maximum number of values to returnAerospikeException
public List<?> findFrom(Value begin, int count, String filterModule, String filterName, Value... filterArgs) throws AerospikeException
begin
- start value (inclusive)count
- maximum number of values to return after applying lua filterfilterModule
- 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, int count) throws AerospikeException
begin
- low value of the range (inclusive)end
- high value of the range (inclusive)count
- maximum number of values to return, pass in zero to obtain all values within rangeAerospikeException
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<?> range(Value begin, Value end, int count, String filterModule, String filterName, Value... filterArgs) throws AerospikeException
begin
- low value of the range (inclusive)end
- high value of the range (inclusive)count
- maximum number of values to return after applying lua filter. Pass in zero to obtain all values within range.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 setPageSize(int pageSize) throws AerospikeException
pageSize
- page size in bytesAerospikeException
Copyright © 2012–2015 Aerospike, Inc. All rights reserved.