public static enum SyncSession.State extends Enum<SyncSession.State>
INACTIVE.
A Realm will automatically synchronize data with the server if the session is either ACTIVE
or DYING and SyncSession.isConnected() returns true.
| Enum Constant and Description |
|---|
ACTIVE
The Realm is open and data will be synchronized between the device and the server
if the underlying connection is
ConnectionState.CONNECTED. |
DYING
The Realm was closed, but still contains data that needs to be synchronized to the server.
|
INACTIVE
This is the initial state.
|
WAITING_FOR_ACCESS_TOKEN
The user is attempting to synchronize data but needs a valid access token to do so.
|
| Modifier and Type | Method and Description |
|---|---|
static SyncSession.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SyncSession.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SyncSession.State INACTIVE
ACTIVE when a Realm is opened.public static final SyncSession.State ACTIVE
ConnectionState.CONNECTED.
The session will remain in this state until the Realm
is closed. In which case it will become DYING.
public static final SyncSession.State DYING
INACTIVE.public static final SyncSession.State WAITING_FOR_ACCESS_TOKEN
Data cannot be synchronized in this state.
Once a valid token is acquired, the session will transition to ACTIVE.
public static SyncSession.State[] values()
for (SyncSession.State c : SyncSession.State.values()) System.out.println(c);
public static SyncSession.State valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null