SyncMutator

abstract class SyncMutator : Disposable

Mutator is a functional object that you provide to modify entity data in a controlled manner. Override onApplied to perform your modifications. This method will be provided with the previous data contents and should return new desired contents or null to abort mutate operation. You *must* dispose() a mutator to avoid memory leaks. Internally, the native part will keep a strong reference to the Java class, keeping it from being GC'd.

Constructors

Link copied to clipboard
open fun SyncMutator()
Sole constructor.

Functions

Link copied to clipboard
open fun dispose()
Link copied to clipboard
open fun onApplied(currentData: JSONObject): JSONObject
Override this method to provide your own implementation of data mutator.