Docs Menu

Interface RxObservableFactory

On this page

  • io.realm.rx
  • Method Summary
  • Method Detail
  • changesetsFrom
  • from

Factory interface for creating Rx Observables for Realm classes.

Modifier and Type
Method and Description
public <any>

Creates an Observable for a RealmObject .

public <any>
Realm realm,
E object
)

Creates an Observable for a RealmObject .

public <any>

Creates an Observable for a RealmList .

public <any>

Creates an Observable for a RealmList .

public <any>

Creates an Observable for a RealmResults .

public <any>

Creates an Observable for a RealmResults .

public <any>

Creates a Single from a RealmQuery .

public <any>

Creates a Single from a RealmQuery .

public <any>

Creates a Flowable for a DynamicRealmObject .

public <any>
from <E >(
Realm realm,
E object
)

Creates a Flowable for a RealmObject .

public <any>

Creates a Flowable for a RealmList .

public <any>

Creates an Observable for a RealmList .

public <any>

Creates a Flowable for a RealmResults .

public <any>
from <E >(
)

Creates a Flowable for a RealmResults .

public <any>

Creates a Flowable for a DynamicRealm .

public <any>
Realm realm
)

Creates a Flowable for a Realm .

public <any> changesetsFrom (
)

Creates an Observable for a RealmObject . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + the io.realm.ObjectChangeSet that describes the update.

Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user.

Parameters

  • object - RealmObject to listen to changes for.
  • realm - Realm instance object is coming from.
public <any> changesetsFrom <E >(
Realm realm,
E object
)

Creates an Observable for a RealmObject . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + the io.realm.ObjectChangeSet that describes the update.

Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user.

Type Parameters

  • E - type of RealmObject

Parameters

  • object - RealmObject to listen to changes for.
  • realm - Realm instance object is coming from.
public <any> changesetsFrom <E >(
)

Creates an Observable for a RealmList . It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmList it should emit the RealmList + the OrderedCollectionChangeSet that describes the update.

Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users.

Parameters

  • list - RealmList to listen to changes for.
  • realm - Realm instance list is coming from.

Returns

Rx observable that emit all updates + their changeset.

public <any> changesetsFrom <E >(
)

Creates an Observable for a RealmList . It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmIst it should emit the RealmList + the OrderedCollectionChangeSet that describes the update.

Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users.

Type Parameters

  • E - type of RealmObject

Parameters

  • list - RealmList to listen to changes for.
  • realm - Realm instance list is coming from.

Returns

Rx observable that emit all updates + their changeset.

public <any> changesetsFrom <E >(
)

Creates an Observable for a RealmResults . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + the OrderedCollectionChangeSet that describes the update.

Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users.

Parameters

  • results - RealmResults to listen to changes for.
  • realm - Realm instance results are coming from.

Returns

Rx observable that emit all updates + their changeset.

public <any> changesetsFrom <E >(
)

Creates an Observable for a RealmResults . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + the OrderedCollectionChangeSet that describes the update.

Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users.

Type Parameters

  • E - type of RealmObject

Parameters

  • results - RealmResults to listen to changes for.
  • realm - Realm instance results are coming from.

Returns

Rx observable that emit all updates + their changeset.

public <any> from <E >(
)

Creates a Single from a RealmQuery . It should emit the query and then complete.

A RealmQuery observable is cold.

Parameters

  • query - RealmObject to listen to changes for.
  • realm - DynamicRealm instance query is coming from.
public <any> from <E >(
)

Creates a Single from a RealmQuery . It should emit the query and then complete.

A RealmQuery observable is cold.

Type Parameters

  • E - type of query target

Parameters

  • query - RealmQuery to emit.
  • realm - Realm instance query is coming from.
public <any> from (
)

Creates a Flowable for a DynamicRealmObject . It should emit the initial object when subscribed to and on each subsequent update of the object.

DynamicRealmObject observables are hot as DynamicRealmObjects automatically are kept up to date.

Parameters

  • object - DynamicRealmObject to listen to changes for.
  • realm - DynamicRealm instance object is coming from.
public <any> from <E >(
Realm realm,
E object
)

Creates a Flowable for a RealmObject . It should emit the initial object when subscribed to and on each subsequent update of the object.

RealmObject observables are hot as RealmObjects are automatically kept up to date.

Type Parameters

  • E - type of query target

Parameters

  • object - RealmObject to listen to changes for.
  • realm - Realm instance object is coming from.
public <any> from <E >(
)

Creates a Flowable for a RealmList . It should emit the initial list when subscribed to and on each subsequent update of the RealmList.

RealmList observables are hot as RealmLists are automatically kept up to date.

Note: io.realm.RealmChangeListener is currently not supported on RealmLists.

Parameters

  • list - RealmList to listen to changes for.
  • realm - DynamicRealm instance list is coming from.
public <any> from <E >(
)

Creates an Observable for a RealmList . It should emit the initial list when subscribed to and on each subsequent update of the RealmList.

RealmList observables are hot as RealmLists are automatically kept up to date.

Note: io.realm.RealmChangeListener is currently not supported on RealmLists.

Type Parameters

  • E - type of query target

Parameters

  • list - RealmObject to listen to changes for.
  • realm - Realm instance list is coming from.
public <any> from <E >(
)

Creates a Flowable for a RealmResults . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults.

Realm observables are hot as RealmResults are automatically kept up to date.

Parameters

Returns

Rx observable that emit all updates to the RealmResults.

public <any> from <E >(
)

Creates a Flowable for a RealmResults . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults.

RealmResults observables are hot as RealmResults are automatically kept up to date.

Type Parameters

  • E - type of RealmObject

Parameters

  • results - RealmResults to listen to changes for.
  • realm - Realm instance results are coming from.

Returns

Rx observable that emit all updates to the RealmObject.

public <any> from (
)

Creates a Flowable for a DynamicRealm . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm.

DynamicRealm observables are hot as DynamicRealms are automatically kept up to date.

Parameters

Returns

Rx observable that emit all updates to the DynamicRealm.

public <any> from (
Realm realm
)

Creates a Flowable for a Realm . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm.

Realm flowables are hot as Realms are automatically kept up to date.

Parameters

  • realm - Realm to listen to changes for.

Returns

Rx observable that emit all updates to the Realm.

←  Class RealmObservableFactoryUpgrade from Stitch to Realm - Java SDK →
Give Feedback
© 2022 MongoDB, Inc.

About

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