public class RealmFlowFactory extends Object implements FlowFactory
Flows.
This class is used by default unless overridden in RealmConfiguration.Builder.flowFactory(FlowFactory).
| Constructor and Description |
|---|
RealmFlowFactory(Boolean returnFrozenObjects)
Constructor for the Flow factory.
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
changesetFrom(DynamicRealm dynamicRealm,
DynamicRealmObject dynamicRealmObject)
Creates a
Flow for a DynamicRealmObject. |
<T> <any> |
changesetFrom(DynamicRealm dynamicRealm,
RealmList<T> list)
Creates a
Flow for a RealmList. |
<T> <any> |
changesetFrom(DynamicRealm dynamicRealm,
RealmResults<T> results)
Creates a
Flow for a RealmResults instance. |
<T> <any> |
changesetFrom(Realm realm,
RealmList<T> list)
Creates a
Flow for a RealmList. |
<T> <any> |
changesetFrom(Realm realm,
RealmResults<T> results)
Creates a
Flow for a RealmResults instance. |
<T extends RealmModel> |
changesetFrom(Realm realm,
T realmObject)
Creates a
Flow for a RealmObject. |
<any> |
from(DynamicRealm dynamicRealm)
Creates a
Flow for a DynamicRealm. |
<any> |
from(DynamicRealm dynamicRealm,
DynamicRealmObject dynamicRealmObject)
Creates a
Flow for a DynamicRealmObject. |
<T> <any> |
from(DynamicRealm dynamicRealm,
RealmList<T> realmList)
Creates a
Flow for a RealmList. |
<T> <any> |
from(DynamicRealm dynamicRealm,
RealmResults<T> results)
Creates a
Flow for a RealmResults. |
<any> |
from(Realm realm)
Creates a
Flow for a Realm. |
<T> <any> |
from(Realm realm,
RealmList<T> realmList)
Creates a
Flow for a RealmList. |
<T> <any> |
from(Realm realm,
RealmResults<T> results)
Creates a
Flow for a RealmResults. |
<T extends RealmModel> |
from(Realm realm,
T realmObject)
Creates a
Flow for a RealmObject. |
public RealmFlowFactory(Boolean returnFrozenObjects)
returnFrozenObjects - whether the emissions should return frozen objects or not.public <any> from(Realm realm)
FlowFactoryFlow for a Realm. It should emit the initial state of the Realm when subscribed to and
on each subsequent update of the Realm.from in interface FlowFactoryrealm - Realm instance being observed for changes to be emitted by the flow.public <any> from(DynamicRealm dynamicRealm)
FlowFactoryFlow for a DynamicRealm. It should emit the initial state of the Realm when subscribed to and
on each subsequent update of the Realm.from in interface FlowFactorydynamicRealm - DynamicRealm instance being observed for changes to be emitted by the flow.public <T> <any> from(Realm realm, RealmResults<T> results)
FlowFactoryFlow for a RealmResults. It should emit the initial RealmResult when subscribed to and
on each subsequent update of the RealmResults.from in interface FlowFactoryT - type of RealmObject.realm - Realm instance from where the results are coming.results - RealmResults instance being observed for changes to be emitted by the flow.Flow that emits all updates to the RealmObject.public <T> <any> changesetFrom(Realm realm, RealmResults<T> results)
FlowFactoryFlow 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 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.
changesetFrom in interface FlowFactoryrealm - Realm instance from where the object is coming.results - RealmResults instance being observed for changes to be emitted by the flow.Flow that emits all updates to the RealmResults.public <T> <any> from(DynamicRealm dynamicRealm, RealmResults<T> results)
FlowFactoryFlow for a RealmResults. It should emit the initial RealmResult when subscribed to and
on each subsequent update of the RealmResults.from in interface FlowFactoryT - type of RealmObject.dynamicRealm - DynamicRealm instance from where the results are coming.results - RealmResults instance being observed for changes to be emitted by the flow.Flow that emits all updates to the RealmObject.public <T> <any> changesetFrom(DynamicRealm dynamicRealm, RealmResults<T> results)
FlowFactoryFlow 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 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.
changesetFrom in interface FlowFactorydynamicRealm - DynamicRealm instance from where the object is coming.results - RealmResults instance being observed for changes to be emitted by the flow.Flow that emits all updates to the RealmResults.public <T> <any> from(Realm realm, RealmList<T> realmList)
FlowFactoryFlow for a RealmList. It should emit the initial RealmResult when subscribed to and
on each subsequent update of the RealmList.
Note: RealmChangeListener is currently not supported on RealmLists.
from in interface FlowFactoryT - type of RealmObjectrealm - Realm instance from where the results are coming.realmList - RealmList instance being observed for changes to be emitted by the flow.Flow that emit all updates to the RealmList.public <T> <any> changesetFrom(Realm realm, RealmList<T> list)
FlowFactoryFlow 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 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.
changesetFrom in interface FlowFactoryrealm - Realm instance from where the object is coming.list - RealmList instance being observed for changes to be emitted by the flow.Flow that emits all updates to the RealmList.public <T> <any> from(DynamicRealm dynamicRealm, RealmList<T> realmList)
FlowFactoryFlow for a RealmList. It should emit the initial RealmResult when subscribed to and
on each subsequent update of the RealmList.
Note: RealmChangeListener is currently not supported on RealmLists.
from in interface FlowFactoryT - type of RealmObjectdynamicRealm - DynamicRealm instance from where the results are coming.realmList - RealmList instance being observed for changes to be emitted by the flow.Flow that emit all updates to the RealmList.public <T> <any> changesetFrom(DynamicRealm dynamicRealm, RealmList<T> list)
FlowFactoryFlow 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 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.
changesetFrom in interface FlowFactorydynamicRealm - DynamicRealm instance from where the object is coming.list - RealmList instance being observed for changes to be emitted by the flow.Flow that emits all updates to the RealmList.public <T extends RealmModel> <any> from(Realm realm, T realmObject)
FlowFactoryFlow for a RealmObject. It should emit the initial object when subscribed to and on each
subsequent update of the object.from in interface FlowFactoryT - type of query targetrealm - Realm instance from where the object is coming.realmObject - RealmObject instance being observed for changes to be emitted by the flow.Flow that emits all updates to the DynamicRealmObject.public <T extends RealmModel> <any> changesetFrom(Realm realm, T realmObject)
FlowFactoryFlow 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 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.
changesetFrom in interface FlowFactoryrealm - Realm instance from where the object is coming.realmObject - RealmObject instance being observed for changes to be emitted by the flow.Flow that emits all updates to the DynamicRealmObject.public <any> from(DynamicRealm dynamicRealm, DynamicRealmObject dynamicRealmObject)
FlowFactoryFlow for a DynamicRealmObject. It should emit the initial object when subscribed to and
on each subsequent update of the object.from in interface FlowFactorydynamicRealm - DynamicRealm instance from where the object is coming.dynamicRealmObject - DynamicRealmObject instance being observed for changes to be emitted by the flow.Flow that emits all updates to the DynamicRealmObject.public <any> changesetFrom(DynamicRealm dynamicRealm, DynamicRealmObject dynamicRealmObject)
FlowFactoryFlow 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 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.
changesetFrom in interface FlowFactorydynamicRealm - DynamicRealm instance from where the object is coming.dynamicRealmObject - DynamicRealmObject instance being observed for changes to be emitted by the flow.Flow that emits all updates to the DynamicRealmObject.