setTtl

abstract fun setTtl(ttlSeconds: Long, callback: SuccessListener<SyncDocumentJava>): CancellationToken

Set time to live for this SyncDocumentJava.

This TTL specifies the minimum time the object will live, sometime soon after this time the object will be deleted.

If time to live is not specified, object lives infinitely long.

TTL could be used in order to auto-recycle old unused objects, but building app logic, like timers, using TTL is not recommended.

Return

CancellationToken which allows to cancel network request.

Parameters

ttlSeconds

Time to live in seconds from now or 0 to indicate no expiry.

callback

Async result listener. See SuccessListener.