Class RxDao<T,​K>

  • Type Parameters:
    T - Entity type
    K - Primary key (PK) type; use Void if entity does not have exactly one PK

    @Experimental
    public class RxDao<T,​K>
    extends java.lang.Object
    Like AbstractDao but with Rx support. Most methods from AbstractDao are present here, but will return an Observable. Modifying operations return the given entities, so they can be further processed in Rx.

    Instances of RxDao may have an default Scheduler, which is used to configure returned observables with Observable.subscribeOn(Scheduler) (see AbstractDao.rxPlain(), which uses the IO scheduler). Note: DO NOT call more than one data modification operation when you can use a transaction instead (see RxTransaction. Individual calls use a transaction each and are much slower.

    See Also:
    AbstractDao.rxPlain()