sealed class TransactionOperation
Represents a write operation to perform on a data node within an atomic transaction.
See Also
object Abort : TransactionOperation
Operation of aborting the transaction. |
|
object Remove : TransactionOperation
Operation of removing the data node value, equivalent to |
|
class Set : TransactionOperation
Operation of setting a given value to the data node. |
val decrement: (DatasyncValuable) -> TransactionOperation.Set
Transaction function that atomically decrements the value of a data node or sets its initial value to |
|
val increment: (DatasyncValuable) -> TransactionOperation.Set
Transaction function that atomically increments the value of a data node or sets its initial value to |
fun increment(step: Int = 1, start: Int = 0): (DatasyncValuable) -> TransactionOperation.Set
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. |
|
fun toggle(defaultValue: Boolean = false): (DatasyncValuable) -> TransactionOperation
Transaction function that atomically toggles the value of a boolean data node. fun <T : Any> toggle(ping: T, pong: T): (DatasyncValuable) -> TransactionOperation
Transaction function that atomically toggles the value of a data node between 2 values ping and pong. |
|
fun writeIfNone(value: Any?): (DatasyncValuable) -> TransactionOperation
Transaction function that atomically sets a given value to a data node only if it had no value. |
object Abort : TransactionOperation
Operation of aborting the transaction. |
|
object Remove : TransactionOperation
Operation of removing the data node value, equivalent to |
|
class Set : TransactionOperation
Operation of setting a given value to the data node. |