Search in sources :

Example 1 with SchedulerSelector

use of com.wangjiegulu.cleanandroidprojectmvp.provider.support.bridge.testable.rx.scheduler.SchedulerSelector in project CleanAndroidProject_MVP by wangjiegulu.

the class ProviderSchedulers method initialize.

public static void initialize() {
    SchedulerSelector schedulerSelector = SchedulerSelector.get();
    schedulerSelector.putScheduler(ProviderSchedulers.NET, () -> Schedulers.from(THREAD_POOL_EXECUTOR_NETWORK));
    schedulerSelector.putScheduler(ProviderSchedulers.DB, () -> Schedulers.from(THREAD_POOL_EXECUTOR_DATABASE));
}
Also used : SchedulerSelector(com.wangjiegulu.cleanandroidprojectmvp.provider.support.bridge.testable.rx.scheduler.SchedulerSelector)

Example 2 with SchedulerSelector

use of com.wangjiegulu.cleanandroidprojectmvp.provider.support.bridge.testable.rx.scheduler.SchedulerSelector in project CleanAndroidProject_MVP by wangjiegulu.

the class ProviderSchedulers method setAllSchedulers.

@VisibleForTesting
public static void setAllSchedulers(Scheduler scheduler) {
    SchedulerSelector schedulerSelector = SchedulerSelector.get();
    schedulerSelector.putScheduler(ProviderSchedulers.NET, () -> scheduler);
    schedulerSelector.putScheduler(ProviderSchedulers.DB, () -> scheduler);
}
Also used : SchedulerSelector(com.wangjiegulu.cleanandroidprojectmvp.provider.support.bridge.testable.rx.scheduler.SchedulerSelector) VisibleForTesting(android.support.annotation.VisibleForTesting)

Aggregations

SchedulerSelector (com.wangjiegulu.cleanandroidprojectmvp.provider.support.bridge.testable.rx.scheduler.SchedulerSelector)2 VisibleForTesting (android.support.annotation.VisibleForTesting)1