public enum ClientResyncMode extends Enum<ClientResyncMode>
A Client Resync is triggered if the device and server cannot agree on a common shared history for the Realm file, thus making it impossible for the device to upload or receive any changes. This can happen if the server is rolled back or restored from backup.
IMPORTANT: Just having the device offline will not trigger a Client Resync.
|Enum Constant and Description|
The local Realm will be discarded and replaced with the server side Realm.
A manual Client Resync is also known as a Client Reset.
Realm will compare the local Realm with the Realm on the server and automatically transfer any changes from the local Realm that makes sense to the Realm provided by the server.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final ClientResyncMode RECOVER_LOCAL_REALM
This is the default mode for fully synchronized Realms. It is not yet supported by Query-based Realms.
public static final ClientResyncMode DISCARD_LOCAL_REALM
This mode is not yet supported by Query-based Realms.
public static final ClientResyncMode MANUAL
ClientResetRequiredError will be sent to
SyncSession.ErrorHandler.onError(SyncSession, ObjectServerError), triggering
a Client Reset. Doing this provides a handle to both the old and new Realm file, enabling
full control of which changes to move, if any.
This is the only supported mode for Query-based Realms.
public static ClientResyncMode values()
for (ClientResyncMode c : ClientResyncMode.values()) System.out.println(c);
public static ClientResyncMode valueOf(String name)
name- the name of the enum constant to be returned.
IllegalArgumentException- if this enum type has no constant with the specified name
NullPointerException- if the argument is null
public byte getNativeValue()