Class Sync

java.lang.Object
io.objectbox.sync.Sync

public final class Sync extends Object
ObjectBox Sync makes data available on other devices. Start building a sync client using Sync.client(BoxStore, String, SyncCredentials) or an embedded server using Sync.server(BoxStore, String, SyncCredentials).
  • Method Details

    • isAvailable

      public static boolean isAvailable()
      Returns true if the included native (JNI) ObjectBox library supports Sync.
    • isServerAvailable

      public static boolean isServerAvailable()
      Returns true if the included native (JNI) ObjectBox library supports Sync server.
    • client

      public static SyncBuilder client(BoxStore boxStore, String url, SyncCredentials credentials)
      Start building a sync client. Requires the BoxStore that should be synced with the server, the URL and port of the server to connect to and credentials to authenticate against the server.
    • server

      public static SyncServerBuilder server(BoxStore boxStore, String url, SyncCredentials authenticatorCredentials)
      Start building a sync server. Requires the BoxStore the server should use, the URL and port the server should bind to and authenticator credentials to authenticate clients. Additional authenticator credentials can be supplied using the builder.