Interface RxObservableFactory
-
- All Known Implementing Classes:
RealmObservableFactory
public interface RxObservableFactoryFactory interface for creating Rx Observables for Realm classes.
-
-
Method Summary
-
-
-
Method Detail
-
from
Flowable<Realm> from(Realm realm)
Creates a Flowable for aRealm. 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-Realmto listen to changes for.- Returns:
- Rx observable that emit all updates to the Realm.
-
from
Flowable<DynamicRealm> from(DynamicRealm realm)
Creates a Flowable for aDynamicRealm. 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:
realm-DynamicRealmto listen to changes for.- Returns:
- Rx observable that emit all updates to the DynamicRealm.
-
from
<E> Flowable<RealmResults<E>> from(Realm realm, RealmResults<E> results)
Creates a Flowable for aRealmResults. 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-RealmResultsto listen to changes for.realm-Realminstance results are coming from.- Returns:
- Rx observable that emit all updates to the RealmObject.
-
changesetsFrom
<E> Observable<CollectionChange<RealmResults<E>>> changesetsFrom(Realm realm, RealmResults<E> results)
Creates an Observable for aRealmResults. It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + theOrderedCollectionChangeSetthat 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-RealmResultsto listen to changes for.realm-Realminstance results are coming from.- Returns:
- Rx observable that emit all updates + their changeset.
-
from
<E> Flowable<RealmResults<E>> from(DynamicRealm realm, RealmResults<E> results)
Creates a Flowable for aRealmResults. 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:
results-RealmResultsto listen to changes for.realm-DynamicRealminstance results are coming from.- Returns:
- Rx observable that emit all updates to the RealmResults.
-
changesetsFrom
<E> Observable<CollectionChange<RealmResults<E>>> changesetsFrom(DynamicRealm realm, RealmResults<E> results)
Creates an Observable for aRealmResults. It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + theOrderedCollectionChangeSetthat 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-RealmResultsto listen to changes for.realm-Realminstance results are coming from.- Returns:
- Rx observable that emit all updates + their changeset.
-
from
<E> Flowable<RealmList<E>> from(Realm realm, RealmList<E> list)
Creates an Observable for aRealmList. 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:
RealmChangeListeneris currently not supported on RealmLists.- Type Parameters:
E- type of query target- Parameters:
list- RealmObject to listen to changes for.realm-Realminstance list is coming from.
-
changesetsFrom
<E> Observable<CollectionChange<RealmList<E>>> changesetsFrom(Realm realm, RealmList<E> list)
Creates an Observable for aRealmList. It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmIst it should emit the RealmList + theOrderedCollectionChangeSetthat 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.
-
from
<E> Flowable<RealmList<E>> from(DynamicRealm realm, RealmList<E> list)
Creates a Flowable for aRealmList. 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:
RealmChangeListeneris currently not supported on RealmLists.- Parameters:
list- RealmList to listen to changes for.realm-DynamicRealminstance list is coming from.
-
changesetsFrom
<E> Observable<CollectionChange<RealmList<E>>> changesetsFrom(DynamicRealm realm, RealmList<E> list)
Creates an Observable for aRealmList. It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmList it should emit the RealmList + theOrderedCollectionChangeSetthat 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.
-
from
<E extends RealmModel> Flowable<E> from(Realm realm, E object)
Creates a Flowable for aRealmObject. 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-Realminstance object is coming from.
-
changesetsFrom
<E extends RealmModel> Observable<ObjectChange<E>> changesetsFrom(Realm realm, E object)
Creates an Observable for aRealmObject. It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + theObjectChangeSetthat 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-Realminstance object is coming from.
-
from
Flowable<DynamicRealmObject> from(DynamicRealm realm, DynamicRealmObject object)
Creates a Flowable for aDynamicRealmObject. 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-DynamicRealminstance object is coming from.
-
changesetsFrom
Observable<ObjectChange<DynamicRealmObject>> changesetsFrom(DynamicRealm realm, DynamicRealmObject object)
Creates an Observable for aRealmObject. It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + theObjectChangeSetthat 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-Realminstance object is coming from.
-
from
<E> Single<RealmQuery<E>> from(Realm realm, RealmQuery<E> query)
Creates a Single from aRealmQuery. 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-Realminstance query is coming from.
-
from
<E> Single<RealmQuery<E>> from(DynamicRealm realm, RealmQuery<E> query)
Creates a Single from aRealmQuery. It should emit the query and then complete.A RealmQuery observable is cold.
- Parameters:
query- RealmObject to listen to changes for.realm-DynamicRealminstance query is coming from.
-
-