Package io.objectbox.sync
Class Sync
java.lang.Object
io.objectbox.sync.Sync
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 Summary
Modifier and TypeMethodDescriptionstatic SyncBuilderclient(BoxStore boxStore, String url, SyncCredentials credentials) Start building a sync client.static booleanReturns true if the included native (JNI) ObjectBox library supports Sync.static booleanReturns true if the included native (JNI) ObjectBox library supports Sync server.static SyncServerBuilderserver(BoxStore boxStore, String url, SyncCredentials authenticatorCredentials) Start building a sync server.
-
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
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.
-