SyncList

interface SyncList

SyncList is an ordered sequence of arbitrary JSON objects as values.

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

To obtain an instance of a SyncList use openList.

Types

Link copied to clipboard
interface Item
Single item in a SyncList.
Link copied to clipboard
interface QueryOptions
Options passed while querying SyncList 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 addItem(itemData: JSONObject, listener: SuccessListener<SyncList.Item>)
abstract fun addItem(itemData: JSONObject, metadata: SyncList.Item.Metadata, listener: SuccessListener<SyncList.Item>)
Add Item to the SyncList.
Link copied to clipboard
abstract fun getDateUpdated(): Date
Retrieves a Date when the List was last updated.
Link copied to clipboard
abstract fun getItem(itemIndex: Long, listener: SuccessListener<SyncList.Item>)
Retrieve contents of a given Item in the SyncList.
Link copied to clipboard
abstract fun getItems(listener: SuccessListener<SyncListIterator>)
Get iterator access to all items in the list.
Link copied to clipboard
abstract fun getSid(): String
Retrieves a machine-generated unique identifier for this SyncList.
Link copied to clipboard
abstract fun getUniqueName(): String
Retrieves a user-set unique name for this SyncList.
Link copied to clipboard
abstract fun mutateItem(itemIndex: Long, mutator: SyncMutator, listener: SuccessListener<SyncList.Item>)
abstract fun mutateItem(itemIndex: Long, mutator: SyncMutator, metadata: SyncList.Item.Metadata, listener: SuccessListener<SyncList.Item>)
Mutate contents of a given Item in the SyncList.
Link copied to clipboard
Query paginated sequence of items from the list, based on query options.
Link copied to clipboard
Provide options for querying items from the SyncList.
Link copied to clipboard
abstract fun removeItem(itemIndex: Long, listener: SuccessListener<Void>)
Remove Item from the SyncList.
Link copied to clipboard
abstract fun removeList(listener: SuccessListener<Void>)
Remove entire SyncList object.
Link copied to clipboard
abstract fun setItem(itemIndex: Long, itemData: JSONObject, listener: SuccessListener<SyncList.Item>)
abstract fun setItem(itemIndex: Long, itemData: JSONObject, metadata: SyncList.Item.Metadata, listener: SuccessListener<SyncList.Item>)
Set contents of a given Item in the SyncList.
Link copied to clipboard
abstract fun setItemTtl(itemIndex: Long, 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 list object in seconds.

Properties

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