Docs Menu

Docs HomeDevelop ApplicationsAtlas Device SDKs

Exception ClientResetRequiredError

On this page

  • io.realm.mongodb.sync
  • Method Summary
  • Inherited Methods
  • Method Detail
  • executeClientReset
  • getBackupFile
  • getBackupRealmConfiguration
  • getOriginalFile

Class encapsulating information needed for handling a Client Reset event.

Tip

See also:

Modifier and Type
Method and Description
public void

Calling this method will execute the Client Reset manually instead of waiting until next app restart.

public File

Returns the location of the backed up Realm file.

The configuration that can be used to open the backup Realm offline.

public File

Returns the location of the original Realm file.

  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

  • Methods inherited from class java.lang.Throwable : getMessage , getLocalizedMessage , getCause , initCause , toString , printStackTrace , printStackTrace , printStackTrace , fillInStackTrace , getStackTrace , setStackTrace , addSuppressed , getSuppressed

  • Methods inherited from class io.realm.mongodb.AppException : getErrorCode , getErrorType , getErrorIntValue , getErrorMessage , getException , getCategory , toString

public void executeClientReset ()

Calling this method will execute the Client Reset manually instead of waiting until next app restart. This will only be possible if all instances of that Realm have been closed, otherwise a IllegalStateException will be thrown.

After this method returns, the backup file can be found in the location returned by getBackupFile() . The file at getOriginalFile() have been deleted, but will be recreated from scratch next time a Realm instance is opened.

Throws

Returns the location of the backed up Realm file. The file will not be present until the Client Reset has been fully executed.

Returns

a reference to the location of the backup file once Client Reset has been executed. Use file.exists() to check if the file exists or not.

The configuration that can be used to open the backup Realm offline. This configuration can only be used in combination with a DynamicRealm .

Returns

the configuration that can be used to open the backup Realm offline.

Returns the location of the original Realm file. After the Client Reset has completed, the file at this location will be deleted.

Returns

a reference to the location of the original Realm file. After Client Reset has been executed this file will no longer exists. Use file.exists() to check this.

← Enum SyncSession.State