setTtl

abstract fun setTtl(ttl: Int, listener: SuccessListener<Void>)

Set time to live for stream object in seconds.

This TTL specifies the minimum time the SyncStream 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 it is not recommended to build some app logic like timers using ttl.

Parameters

ttl

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

listener

Async result listener. See SuccessListener.