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
,RecoverOrDiscardUnsyncedChangesStrategy
orRecoverUnsyncedChangesStrategy
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onBeforeReset(Realm realm)
Callback that indicates a Client Reset is about to happen.void
onManualResetFallback(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
- frozenRealm
in 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
-SyncSession
this error happened on.error
-ClientResetRequiredError
the specific Client Reset error.
-
-