Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ / /

Class BaseChangeEvent

On this page

  • io.realm.mongodb.mongo.events
  • Nested Class Summary
  • Method Summary
  • Inherited Methods
  • Method Detail
  • getDocumentKey
  • getFullDocument
  • getOperationType
  • getUpdateDescription
  • hasUncommittedWrites
  • toBsonDocument
java.lang.Object
io.realm.mongodb.mongo.events.BaseChangeEvent

Represents the set of properties that exist on all MongoDB realm change events produced by watch streams in this SDK. Other change event types inherit from this type.

Modifier and Type
Class and Description
public static final
Modifier and Type
Method and Description
public BsonDocument

The unique identifier for the document that was actually changed.

public DocumentT

The full document at some point after the change has been applied.

Returns the operation type of the change that triggered the change event.

In the case of an update, the description of which fields have been added, removed or updated.

public boolean

Indicates a local change event that has not yet been synchronized with a remote data store.

public abstract BsonDocument

Converts the change event to a BSON representation, as it would look on a MongoDB realm change stream, or a Realm compact watch stream.

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

public BsonDocument getDocumentKey ()

The unique identifier for the document that was actually changed.

Returns

the document key.

public DocumentT getFullDocument ()

The full document at some point after the change has been applied.

Returns

the full document.

Returns the operation type of the change that triggered the change event.

Returns

the operation type of this change event.

In the case of an update, the description of which fields have been added, removed or updated.

Returns

the update description.

public boolean hasUncommittedWrites ()

Indicates a local change event that has not yet been synchronized with a remote data store. Used only for the sync use case.

Returns

whether or not this change event represents uncommitted writes.

public abstract BsonDocument toBsonDocument ()

Converts the change event to a BSON representation, as it would look on a MongoDB realm change stream, or a Realm compact watch stream.

Returns

The BSON document representation of the change event.

Back

io.realm.mongodb.mongo.events