Docs Menu

Enum SyncSession.State

On this page

  • io.realm.mongodb.sync
  • Enum Constant Summary
  • Method Summary
  • Inherited Methods
  • Enum Constant Detail
  • ACTIVE
  • DYING
  • INACTIVE
  • Method Detail
  • valueOf
  • values
java.lang.Object
io.realm.mongodb.sync.SyncSession.State

Enclosing class:

SyncSession

Enum describing the states a SyncSession can be in. The initial state is State.INACTIVE .

A Realm will automatically synchronize data with the server if the session is either State.ACTIVE or State.DYING and 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.

Modifier and Type
Method and Description
public static SyncSession.State
public static SyncSession.State
  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize
  • Methods inherited from class java.lang.Enum : name , ordinal , toString , equals , hashCode , clone , compareTo , getDeclaringClass , valueOf , finalize

public static final SyncSession.State

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 .

public static final SyncSession.State

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

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.

public static SyncSession.State valueOf (
String name
)
public static SyncSession.State values ()

←  Interface SyncSession.ErrorHandlerException ClientResetRequiredError →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.