SyncMap

interface SyncMap

SyncMap is a key-value store with Strings as keys and arbitrary JSON objects as values.

You can add, remove and modify values associated with the keys.

To obtain an instance of a SyncMap use openMap.

Types

Link copied to clipboard
interface Item
Single item in a SyncMap.
Link copied to clipboard
interface QueryOptions
Options passed while querying SyncMap objects within Sync specifying query parameters and result set position and sorting.
Link copied to clipboard
Defines collection query direction (forward or backwards item listing)

Functions

Link copied to clipboard
abstract fun getDateUpdated(): Date
Retrieves a Date when the Map was last updated.
Link copied to clipboard
abstract fun getItem(itemKey: String, listener: SuccessListener<SyncMap.Item>)
Retrieve Item from the SyncMap.
Link copied to clipboard
abstract fun getItems(listener: SuccessListener<SyncMapIterator>)
Get iterator access to all items in the map.
Link copied to clipboard
abstract fun getSid(): String
Retrieves a machine-generated unique identifier for this SyncMap.
Link copied to clipboard
abstract fun getUniqueName(): String
Retrieves a user-set unique name for this SyncMap.
Link copied to clipboard
abstract fun mutateItem(itemKey: String, mutator: SyncMutator, listener: SuccessListener<SyncMap.Item>)
abstract fun mutateItem(itemKey: String, mutator: SyncMutator, metadata: SyncMap.Item.Metadata, listener: SuccessListener<SyncMap.Item>)
Mutate Item in the SyncMap.
Link copied to clipboard
Query paginated sequence of items from the map, based on query options.
Link copied to clipboard
Provide options for querying items from the SyncMap.
Link copied to clipboard
abstract fun removeItem(itemKey: String, listener: SuccessListener<Void>)
Remove Item from the SyncMap.
Link copied to clipboard
abstract fun removeMap(listener: SuccessListener<Void>)
Remove entire SyncMap object.
Link copied to clipboard
abstract fun setItem(itemKey: String, itemData: JSONObject, listener: SuccessListener<SyncMap.Item>)
abstract fun setItem(itemKey: String, itemData: JSONObject, metadata: SyncMap.Item.Metadata, listener: SuccessListener<SyncMap.Item>)
Set Item in the SyncMap.
Link copied to clipboard
abstract fun setItemTtl(itemKey: String, ttl: Int, listener: SuccessListener<Void>)
Set time to live for an item in list.
Link copied to clipboard
abstract fun setTtl(ttl: Int, listener: SuccessListener<Void>)
Set time to live for map object in seconds.

Properties

Link copied to clipboard
Time to live for a map, specifying no expiry.