public class Map
extends java.lang.Object
You can add, remove and modify values associated with the keys.
To obtain an instance of a Map use Client#openMap
.
Modifier and Type | Class and Description |
---|---|
static class |
Map.Item
Single item in a Map.
|
static class |
Map.PageSort
Defines result ordering within a single paginator page.
|
static class |
Map.QueryOptions
Defines query options for requesting items from a Map.
|
static class |
Map.QueryOrder
Defines collection query direction (forward or backwards item listing)
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
getItem(java.lang.String itemKey,
long flowId,
SuccessListener<Map.Item> listener)
Retrieve Item from the Map.
|
void |
getItems(SuccessListener<MapIterator> listener)
Get iterator access to all items in the map.
|
java.lang.String |
getSid()
Retrieves a machine-generated unique identifier for this Map.
|
java.lang.String |
getUniqueName()
Retrieves a user-set unique name for this Map.
|
void |
mutateItem(java.lang.String itemKey,
Mutator mutator,
long flowId,
SuccessListener<Map.Item> listener)
Mutate Item in the Map.
|
void |
queryItems(Map.QueryOptions options,
SuccessListener<MapPaginator> listener)
Query paginated sequence of items from the map, based on query options.
|
Map.QueryOptions |
queryOptions()
Provide options for querying items from the Map.
|
void |
removeItem(java.lang.String itemKey,
long flowId,
SuccessListener<java.lang.Void> listener)
Remove Item from the Map.
|
void |
removeMap(long flowId,
SuccessListener<java.lang.Void> listener)
Remove entire Map object.
|
void |
setItem(java.lang.String itemKey,
org.json.JSONObject itemData,
long flowId,
SuccessListener<java.lang.Void> listener)
Set Item in the Map.
|
public java.lang.String getSid()
public java.lang.String getUniqueName()
public void getItem(java.lang.String itemKey, long flowId, SuccessListener<Map.Item> listener)
itemKey
- Key of the item to retrieve.flowId
- Local flow identifier
.listener
- Async result listener. See SuccessListener
.public void setItem(java.lang.String itemKey, org.json.JSONObject itemData, long flowId, SuccessListener<java.lang.Void> listener)
itemKey
- Key of the item to set.itemData
- Item data to set as a JSON object.flowId
- Local flow identifier
.listener
- Async result listener. See SuccessListener
.public void mutateItem(java.lang.String itemKey, Mutator mutator, long flowId, SuccessListener<Map.Item> listener)
itemKey
- Key of the item to mutate.mutator
- Mutator function object.flowId
- Local flow identifier
.listener
- Async result listener. See SuccessListener
.Mutator
public void removeItem(java.lang.String itemKey, long flowId, SuccessListener<java.lang.Void> listener)
itemKey
- Key of the item to remove.flowId
- Local flow identifier
.listener
- Async result listener. See SuccessListener
.public void getItems(SuccessListener<MapIterator> listener)
listener
- Async result listener. See SuccessListener
.public Map.QueryOptions queryOptions()
Options
public void queryItems(Map.QueryOptions options, SuccessListener<MapPaginator> listener)
options
- Specific query options.listener
- Async result listener. See SuccessListener
.public void removeMap(long flowId, SuccessListener<java.lang.Void> listener)
flowId
- Local flow identifier
.listener
- Async result listener. See SuccessListener
.public void dispose()