Package io.realm.mongodb.sync
Interface AutomaticClientResetStrategy
-
- All Superinterfaces:
SyncClientResetStrategy
- All Known Subinterfaces:
DiscardUnsyncedChangesStrategy,RecoverOrDiscardUnsyncedChangesStrategy,RecoverUnsyncedChangesStrategy
public interface AutomaticClientResetStrategy extends SyncClientResetStrategy
Interface that defines an automatic sync client reset strategy, it could be eitherDiscardUnsyncedChangesStrategy,RecoverOrDiscardUnsyncedChangesStrategyorRecoverUnsyncedChangesStrategy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonBeforeReset(Realm realm)Callback that indicates a Client Reset is about to happen.voidonManualResetFallback(SyncSession session, ClientResetRequiredError error)Callback that indicates the Client reset failed to complete.
-
-
-
Method Detail
-
onBeforeReset
void onBeforeReset(Realm realm)
Callback that indicates a Client Reset is about to happen. It provides a handle to the local realm before the reset.- Parameters:
realm- frozenRealmin its state before the reset.
-
onManualResetFallback
void onManualResetFallback(SyncSession session, ClientResetRequiredError error)
Callback that indicates the Client reset failed to complete. It should be handled asManuallyRecoverUnsyncedChangesStrategy.onClientReset(SyncSession, ClientResetRequiredError).- Parameters:
session-SyncSessionthis error happened on.error-ClientResetRequiredErrorthe specific Client Reset error.
-
-