com.aerospike.client.large
Class LargeMap

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

public final class LargeMap
extends Object

Create and manage a map within a single bin.


Constructor Summary
LargeMap(AerospikeClient client, Policy policy, Key key, String binName, String userModule)
          Initialize large map operator.
 
Method Summary
 void destroy()
          Delete bin containing the map.
 Map<?,?> filter(String filterName, Value... filterArgs)
          Select items from map.
 Map<?,?> get(Value name)
          Get value from map given name key.
 int getCapacity()
          Return maximum number of entries for the map.
 Map<?,?> getConfig()
          Return map configuration parameters.
 void put(Map<?,?> map)
          Add map values to map.
 void put(Value name, Value value)
          Add entry to map.
 Map<?,?> scan()
          Return all objects in the map.
 void setCapacity(int capacity)
          Set maximum number of entries for the map.
 int size()
          Return size of map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LargeMap

public LargeMap(AerospikeClient client,
                Policy policy,
                Key key,
                String binName,
                String userModule)
Initialize large map 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 set
Method Detail

put

public final void put(Value name,
                      Value value)
               throws AerospikeException
Add entry to map. If the map does not exist, create it using specified userModule configuration.

Parameters:
name - entry key
value - entry value
Throws:
AerospikeException

put

public final void put(Map<?,?> map)
               throws AerospikeException
Add map values to map. If the map does not exist, create it using specified userModule configuration.

Parameters:
map - map values to push
Throws:
AerospikeException

get

public final Map<?,?> get(Value name)
                   throws AerospikeException
Get value from map given name key.

Parameters:
name - key.
Returns:
map of items selected
Throws:
AerospikeException

scan

public final Map<?,?> scan()
                    throws AerospikeException
Return all objects in the map.

Throws:
AerospikeException

filter

public final Map<?,?> filter(String filterName,
                             Value... filterArgs)
                      throws AerospikeException
Select items from map.

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

destroy

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

Throws:
AerospikeException

size

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

Throws:
AerospikeException

getConfig

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

Throws:
AerospikeException

setCapacity

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

Parameters:
capacity - max entries in set
Throws:
AerospikeException

getCapacity

public final int getCapacity()
                      throws AerospikeException
Return maximum number of entries for the map.

Throws:
AerospikeException


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