Annotation Type Sync


  • @Retention(CLASS)
    @Target(TYPE)
    public @interface Sync
    Enables sync for an 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.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean sharedGlobalIds
      Set to true to enable shared global IDs for a Sync-enabled Entity class.
    • Element Detail

      • sharedGlobalIds

        boolean sharedGlobalIds
        Set to 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.

        Default:
        false