SyncListJava

SyncListJava is an ordered sequence of Item objects as values.

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

To obtain an instance of a SyncListJava use SyncListJava.lists

Types

Link copied to clipboard
data class Item(val index: Long, val jsonData: String, val dateCreated: Long, val dateUpdated: Long, val dateExpires: Long?)

Represents a value associated with each index in SyncListJava.

Link copied to clipboard
interface Listener

Listener for all operations on a SyncListJava.

Properties

Link copied to clipboard
abstract val dateCreated: Long

A date when this SyncListJava was created.

Link copied to clipboard
abstract val dateExpires: Long?

A date this SyncListJava will expire, null means will not expire.

Link copied to clipboard
abstract val dateUpdated: Long

A date when this SyncListJava was last updated.

Link copied to clipboard
abstract val isFromCache: Boolean

true when this SyncListJava is offline and doesn't receive updates from backend, false otherwise.

Link copied to clipboard
abstract val isRemoved: Boolean

true when this SyncListJava has been removed on the backend, false otherwise.

Link copied to clipboard
abstract val sid: String

An immutable system-assigned identifier of this SyncListJava.

Link copied to clipboard

Current subscription state.

Link copied to clipboard
abstract val uniqueName: String?

An optional unique name for this list, assigned at creation time.

Functions

Link copied to clipboard

Add Item in the SyncListJava.

Link copied to clipboard
abstract fun addItemWithTtl(jsonData: String, ttlSeconds: Long, callback: SuccessListener<SyncListJava.Item>): CancellationToken

Add Item in the SyncListJava.

Link copied to clipboard
abstract override fun addListener(listener: SyncListJava.Listener)

Method to add listener for this SyncListJava.

Link copied to clipboard
abstract fun close()

Close this SyncListJava.

Link copied to clipboard
abstract fun getItem(itemIndex: Long, callback: SuccessListener<SyncListJava.Item?>): CancellationToken

Retrieve Item from the SyncListJava.

Link copied to clipboard
abstract fun mutateItem(itemIndex: Long, mutator: SyncMutator, callback: SuccessListener<SyncListJava.Item>): CancellationToken

Mutate value of the Item using provided Mutator function.

Link copied to clipboard
abstract fun mutateItemWithTtl(itemIndex: Long, ttlSeconds: Long, mutator: SyncMutator, callback: SuccessListener<SyncListJava.Item>): CancellationToken

Mutate value of the Item using provided Mutator function.

Link copied to clipboard

Retrieve all items from the SyncListJava.

open fun queryItems(startIndex: Long, includeStartIndex: Boolean): SyncIteratorJava<SyncListJava.Item>
open fun queryItems(startIndex: Long?, includeStartIndex: Boolean, queryOrder: <Error class: unknown class>): SyncIteratorJava<SyncListJava.Item>
open fun queryItems(startIndex: Long?, includeStartIndex: Boolean, queryOrder: <Error class: unknown class>, pageSize: Int): SyncIteratorJava<SyncListJava.Item>
abstract fun queryItems(startIndex: Long?, includeStartIndex: Boolean, queryOrder: <Error class: unknown class>, pageSize: Int, useCache: Boolean): SyncIteratorJava<SyncListJava.Item>

Retrieve items from the SyncListJava.

Link copied to clipboard
abstract override fun removeAllListeners()

Method to remove all listeners from this SyncListJava.

Link copied to clipboard
abstract fun removeItem(itemIndex: Long, callback: SuccessListener<SyncListJava>): CancellationToken

Remove Item from the SyncListJava.

Link copied to clipboard
Link copied to clipboard
abstract override fun removeListener(listener: SyncListJava.Listener)

Method to Method to remove listener from this SyncListJava.

Link copied to clipboard
abstract fun setItem(itemIndex: Long, jsonData: String, callback: SuccessListener<SyncListJava.Item>): CancellationToken

Set Item in the SyncListJava.

Link copied to clipboard
abstract fun setItemWithTtl(itemIndex: Long, jsonData: String, ttlSeconds: Long, callback: SuccessListener<SyncListJava.Item>): CancellationToken

Set Item in the SyncListJava.

Link copied to clipboard
abstract fun setTtl(ttlSeconds: Long, callback: SuccessListener<SyncListJava>): CancellationToken

Set time to live for this SyncListJava.