@Retention(value=CLASS)
@Target(value=TYPE)
public @interface Sync
Entity class.
Note that currently sync can not be enabled or disabled for existing entities. Also synced entities can not have relations to non-synced entities.
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
sharedGlobalIds
|
public abstract boolean sharedGlobalIds
true to enable shared global IDs for a Sync-enabled Entity class.
By default each Sync client has its own local ID space for Objects.
IDs are mapped to global IDs when syncing behind the scenes. Turn this on
to treat Object IDs as global and turn of ID mapping. The ID of an Object will
then be the same on all clients.
When using this, it is recommended to use assignable IDs
to turn off automatically assigned IDs. Without special care, two Sync clients are
likely to overwrite each others Objects if IDs are assigned automatically.