SyncClock constructor

const SyncClock()

Marks an int (64-bit integer) field of a synced Entity class as the sync clock, a "hybrid logical clock" to resolve Sync conflicts.

These clock values allow "last write wins" conflict resolution.

There can be only one sync clock per sync entity type; which is also recommended for basic conflict resolution.

For new objects, initialize the property value to 0 to reserve "a slot" in the object data. ObjectBox Sync will update this property automatically on put operations.

As a hybrid clock, it combines a wall clock with a logical counter to compensate for some clock skew effects.

Implementation

const SyncClock();