Package client.utils

Types

CObjectUId
Link copied to clipboard
common
data class CObjectUId(collectionUId: CollectionUId, type: String, name: String)
Concordant object unique identifier.
CollectionUId
Link copied to clipboard
common
typealias CollectionUId = String

Collection unique identifier.

ConsistencyLevel
Link copied to clipboard
common
enum ConsistencyLevel : Enum<ConsistencyLevel>
Different types of consistency level provided by the Concordant platform.
CServiceAdapter
Link copied to clipboard
common
class CServiceAdapter
Adapter to the Concordant service (C-Service).
Message
Link copied to clipboard
nodeJs
data class Message(type: String, data: String)
Name
Link copied to clipboard
annotation class Name(name: String)
typealias Name = JsName
NotificationHandler
Link copied to clipboard
common
typealias NotificationHandler = (VersionVector, CObjectUId) -> Unit

The notification handler (function) type used is case of object update.

OperationUId
Link copied to clipboard
common
typealias OperationUId = Timestamp

Operation unique identifier.

TransactionBody
Link copied to clipboard
common
typealias TransactionBody = () -> Unit

The function type accepted for a transaction body.

Functions

connectWebSocket
Link copied to clipboard
common
fun connectWebSocket(session: Session)
Open a web socket connection.
disconnectWebSocket
Link copied to clipboard
common
fun disconnectWebSocket()
Close the web socket connection.
generateUUId4
Link copied to clipboard
common
fun generateUUId4(): String
Generates a random uuid (i.e., version 4).
isServiceWorkerActive
Link copied to clipboard
common
fun isServiceWorkerActive(): Boolean
Is service worker registered?
fun isServiceWorkerActive(): Boolean
Service worker is always inactive in JVM.
nodeJs
fun isServiceWorkerActive(): Boolean
Is service worker active?
isServiceWorkerAvailable
Link copied to clipboard
common
fun isServiceWorkerAvailable(): Boolean
Is service worker feature available?
fun isServiceWorkerAvailable(): Boolean
Service worker is always unavailable in JVM.
nodeJs
fun isServiceWorkerAvailable(): Boolean
Is service worker feature available?
registerServiceWorker
Link copied to clipboard
common
fun registerServiceWorker(session: Session)
Register a service worker.
fun registerServiceWorker(session: Session)
Does nothing, service worker is not used in JVM.
nodeJs
fun registerServiceWorker(session: Session)
Register the service worker.

Properties

ActiveSession
Link copied to clipboard
common
var ActiveSession: Session? = null
Global variable storing a reference to the currently active session.
ActiveTransaction
Link copied to clipboard
common
var ActiveTransaction: Transaction? = null
Global variable storing a reference to the currently active transaction.
client
Link copied to clipboard
common
var client: HttpClient? = null
DISCONNECTTIMEOUT
Link copied to clipboard
common
val DISCONNECTTIMEOUT: Long = 5000L
SERVERERRORTIMEOUT
Link copied to clipboard
common
val SERVERERRORTIMEOUT: Long = 30000L