本文整理汇总了Java中reactor.core.scheduler.Schedulers.resetFactory方法的典型用法代码示例。如果您正苦于以下问题:Java Schedulers.resetFactory方法的具体用法?Java Schedulers.resetFactory怎么用?Java Schedulers.resetFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reactor.core.scheduler.Schedulers
的用法示例。
在下文中一共展示了Schedulers.resetFactory方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reset
import reactor.core.scheduler.Schedulers; //导入方法依赖的package包/类
/**
* Re-assign the default Reactor Core {@link Schedulers} factories.
* While the method is thread safe, its usually advised to execute such wide-impact
* AFTER all tested code has been run (teardown etc).
*/
public static void reset() {
VirtualTimeScheduler s = CURRENT.get();
if (s != null && CURRENT.compareAndSet(s, null)) {
Schedulers.resetFactory();
}
}
示例2: dispose
import reactor.core.scheduler.Schedulers; //导入方法依赖的package包/类
@Override
public void dispose() {
if (shutdown) {
return;
}
queue.clear();
shutdown = true;
directWorker.dispose();
//TODO remove the below behavior?
VirtualTimeScheduler s = CURRENT.get();
if (s != null && s == this && CURRENT.compareAndSet(s, null)) {
Schedulers.resetFactory();
}
}
示例3: cleanupHooks
import reactor.core.scheduler.Schedulers; //导入方法依赖的package包/类
@PreDestroy
public void cleanupHooks() {
Hooks.resetOnLastOperator();
Schedulers.resetFactory();
}
示例4: cleanup
import reactor.core.scheduler.Schedulers; //导入方法依赖的package包/类
@BeforeClass
public static void cleanup() {
Hooks.resetOnLastOperator();
Schedulers.resetFactory();
}
示例5: setup
import reactor.core.scheduler.Schedulers; //导入方法依赖的package包/类
@BeforeClass
public static void setup() {
Hooks.resetOnLastOperator();
Schedulers.resetFactory();
}
示例6: cleanup
import reactor.core.scheduler.Schedulers; //导入方法依赖的package包/类
@AfterClass
public static void cleanup() {
Hooks.resetOnLastOperator();
Schedulers.resetFactory();
}