openOrCreate

Open existing SyncDocumentJava by unique name or create a new one if specified name does not exist.

Return

CancellationToken which allows to cancel network request.

Parameters

uniqueName

Unique name to find existing document or to assign to new document upon creation.

output

Listener that will receive opened or created SyncDocumentJava in its onSuccess() callback or any error in onFailure() callback.


open fun openOrCreate(uniqueName: String, ttlSeconds: Long, output: SuccessListener<SyncDocumentJava>): CancellationToken

Open existing SyncDocumentJava by unique name or create a new one if specified name does not exist.

Return

CancellationToken which allows to cancel network request.

Parameters

uniqueName

Unique name to find existing document or to assign to new document upon creation.

ttlSeconds

Time to live in seconds from now.

output

Listener that will receive opened or created SyncDocumentJava in its onSuccess() callback or any error in onFailure() callback.


abstract fun openOrCreate(uniqueName: String, ttlSeconds: Long, listener: SyncDocumentJava.Listener?, output: SuccessListener<SyncDocumentJava>): CancellationToken

Open existing SyncDocumentJava by unique name or create a new one if specified name does not exist.

Return

CancellationToken which allows to cancel network request.

Parameters

uniqueName

Unique name to find existing document or to assign to new document upon creation.

ttlSeconds

Time to live in seconds from now.

listener

SyncDocumentJava.Listener that will receive notifications regarding this document.

output

Listener that will receive opened or created SyncDocumentJava in its onSuccess() callback or any error in onFailure() callback.