Docs Menu

Docs HomeDevelop ApplicationsAtlas Device SDKs

Interface FlowFactory

On this page

  • io.realm.coroutines
  • Method Summary
  • Method Detail
  • changesetFrom
  • from

Factory interface for creating Kotlin Flow**s for Realm classes.

Modifier and Type
Method and Description
public <any>
DynamicRealm dynamicRealm,
DynamicRealmObject dynamicRealmObject
)

Creates a Flow for a DynamicRealmObject .

public <any>
Realm realm,
T realmObject
)

Creates a Flow for a RealmObject .

public <any>

Creates a Flow for a RealmList .

public <any>

Creates a Flow for a RealmList .

public <any>

Creates a Flow for a RealmResults instance.

public <any>

Creates a Flow for a RealmResults instance.

public <any>
DynamicRealm dynamicRealm,
DynamicRealmObject dynamicRealmObject
)

Creates a Flow for a DynamicRealmObject .

public <any>
from <T >(
Realm realm,
T realmObject
)

Creates a Flow for a RealmObject .

public <any>
from <T >(
DynamicRealm dynamicRealm,
)

Creates a Flow for a RealmList .

public <any>
from <T >(
)

Creates a Flow for a RealmList .

public <any>
from <T >(
)

Creates a Flow for a RealmResults .

public <any>
from <T >(
)

Creates a Flow for a RealmResults .

public <any>
DynamicRealm dynamicRealm
)

Creates a Flow for a DynamicRealm .

public <any>
Realm realm
)

Creates a Flow for a Realm .

public <any> changesetFrom (
DynamicRealm dynamicRealm,
DynamicRealmObject dynamicRealmObject
)

Creates a Flow for a DynamicRealmObject . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object plus 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

  • dynamicRealm - DynamicRealm instance from where the object is coming.

  • dynamicRealmObject - DynamicRealmObject instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the DynamicRealmObject.

public <any> changesetFrom <T >(
Realm realm,
T realmObject
)

Creates a Flow 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 plus 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

  • realm - Realm instance from where the object is coming.

  • realmObject - RealmObject instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the DynamicRealmObject.

public <any> changesetFrom <T >(
)

Creates a Flow for a RealmList . It should emit the initial list when subscribed to and on each subsequent update of the list it should emit the list plus the io.realm.rx.CollectionChange 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

  • dynamicRealm - DynamicRealm instance from where the object is coming.

  • list - RealmList instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the RealmList.

public <any> changesetFrom <T >(
)

Creates a Flow for a RealmList . It should emit the initial list when subscribed to and on each subsequent update of the list it should emit the list plus the io.realm.rx.CollectionChange 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

  • realm - Realm instance from where the object is coming.

  • list - RealmList instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the RealmList.

public <any> changesetFrom <T >(
)

Creates a Flow for a RealmResults instance. It should emit the initial results when subscribed to and on each subsequent update of the results it should emit the results plus the io.realm.rx.CollectionChange 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

  • dynamicRealm - DynamicRealm instance from where the object is coming.

  • results - RealmResults instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the RealmResults.

public <any> changesetFrom <T >(
)

Creates a Flow for a RealmResults instance. It should emit the initial results when subscribed to and on each subsequent update of the results it should emit the results plus the io.realm.rx.CollectionChange 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

  • realm - Realm instance from where the object is coming.

  • results - RealmResults instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the RealmResults.

public <any> from (
DynamicRealm dynamicRealm,
DynamicRealmObject dynamicRealmObject
)

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

Parameters

  • dynamicRealm - DynamicRealm instance from where the object is coming.

  • dynamicRealmObject - DynamicRealmObject instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the DynamicRealmObject.

public <any> from <T >(
Realm realm,
T realmObject
)

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

Type Parameters

  • T - type of query target

Parameters

  • realmObject - RealmObject instance being observed for changes to be emitted by the flow.

  • realm - Realm instance from where the object is coming.

Returns

Flow that emits all updates to the DynamicRealmObject.

public <any> from <T >(
DynamicRealm dynamicRealm,
)

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

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

Type Parameters

  • T - type of RealmObject

Parameters

  • realmList - RealmList instance being observed for changes to be emitted by the flow.

  • dynamicRealm - DynamicRealm instance from where the results are coming.

Returns

Flow that emit all updates to the RealmList.

public <any> from <T >(
)

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

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

Type Parameters

  • T - type of RealmObject

Parameters

  • realmList - RealmList instance being observed for changes to be emitted by the flow.

  • realm - Realm instance from where the results are coming.

Returns

Flow that emit all updates to the RealmList.

public <any> from <T >(
)

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

Type Parameters

  • T - type of RealmObject.

Parameters

  • results - RealmResults instance being observed for changes to be emitted by the flow.

  • dynamicRealm - DynamicRealm instance from where the results are coming.

Returns

Flow that emits all updates to the RealmObject.

public <any> from <T >(
)

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

Type Parameters

  • T - type of RealmObject.

Parameters

  • results - RealmResults instance being observed for changes to be emitted by the flow.

  • realm - Realm instance from where the results are coming.

Returns

Flow that emits all updates to the RealmObject.

public <any> from (
DynamicRealm dynamicRealm
)

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

Parameters

  • dynamicRealm - DynamicRealm instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the Realm.

public <any> from (
Realm realm
)

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

Parameters

  • realm - Realm instance being observed for changes to be emitted by the flow.

Returns

Flow that emits all updates to the Realm.

← io.realm.coroutines