Enum SyncSession.State

    • Enum Constant Detail

      • INACTIVE

        public static final SyncSession.State INACTIVE
        This is the initial state. The session is closed. No data is being synchronized. The session will automatically transition to ACTIVE when a Realm is opened.
      • ACTIVE

        public static final SyncSession.State ACTIVE
        The Realm is open and data will be synchronized between the device and the server if the underlying connection is ConnectionState.CONNECTED.

        The session will remain in this state until the Realm is closed. In which case it will become DYING.

      • DYING

        public static final SyncSession.State DYING
        The Realm was closed, but still contains data that needs to be synchronized to the server. The session will attempt to upload all local data before going INACTIVE.

        public static final SyncSession.State WAITING_FOR_ACCESS_TOKEN
        The user is attempting to synchronize data but needs a valid access token to do so. Realm will either use a cached token or automatically try to acquire one based on the current users login. This requires a network connection.

        Data cannot be synchronized in this state.

        Once a valid token is acquired, the session will transition to ACTIVE.

    • Method Detail

      • values

        public static SyncSession.State[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SyncSession.State c : SyncSession.State.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SyncSession.State valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null