本文整理汇总了Java中rx.schedulers.Schedulers.computation方法的典型用法代码示例。如果您正苦于以下问题:Java Schedulers.computation方法的具体用法?Java Schedulers.computation怎么用?Java Schedulers.computation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rx.schedulers.Schedulers
的用法示例。
在下文中一共展示了Schedulers.computation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import rx.schedulers.Schedulers; //导入方法依赖的package包/类
public static void main(String... args) {
Scheduler observeOn = Schedulers.computation(); // Or use mainThread() for Android.
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://example.com")
.addCallAdapterFactory(new ObserveOnMainCallAdapterFactory(observeOn))
.addCallAdapterFactory(RxJavaCallAdapterFactory.createWithScheduler(io()))
.build();
// Services created with this instance that use Observable will execute on the 'io' scheduler
// and notify their observer on the 'computation' scheduler.
}
示例2: compute
import rx.schedulers.Schedulers; //导入方法依赖的package包/类
@Override
public Scheduler compute() {
return Schedulers.computation();
}
示例3: RetrieveWelcomeMessageUC
import rx.schedulers.Schedulers; //导入方法依赖的package包/类
public RetrieveWelcomeMessageUC() {
super(Schedulers.computation(), AndroidSchedulers.mainThread(), LoggerFactory.getLogger(RetrieveWelcomeMessageUC.class));
}
示例4: computation
import rx.schedulers.Schedulers; //导入方法依赖的package包/类
@Override
public Scheduler computation() {
return Schedulers.computation();
}
示例5: getComputationScheduler
import rx.schedulers.Schedulers; //导入方法依赖的package包/类
@NonNull
@Override
public Scheduler getComputationScheduler() {
return Schedulers.computation();
}