Companion

object Companion

Provides some usual transaction functions for the DatasyncNode.runTransaction method.

Properties

Link copied to clipboard

Transaction function that atomically decrements the value of a data node or sets its initial value to 0 if it had no value.

Link copied to clipboard

Transaction function that atomically increments the value of a data node or sets its initial value to 0 if it had no value.

Functions

Link copied to clipboard

Transaction function that atomically increments the value of a data node by a given step or sets the initial start value if the data node had no value.

Link copied to clipboard

Transaction function that atomically toggles the value of a boolean data node.

inline fun <T : Any> toggle(ping: T, pong: T): (DatasyncValue) -> TransactionOperation

Transaction function that atomically toggles the value of a data node between 2 values ping and pong.

Link copied to clipboard

Transaction function that atomically sets a given value to a data node only if it had no value.