Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / TransactionOperation / increment

increment

@JvmOverloads @JvmStatic 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.

This function is expected to be passed to the DatasyncNode.runTransaction method.

val increment: (DatasyncValuable) -> TransactionOperation.Set

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

This function is expected to be passed to the DatasyncNode.runTransaction method.