Public boolean checkStatus(){
if(case){
return true;
}
return false;
}
final ActorSystem system = ActorSystem.apply();
Cancellable result = system.scheduler.schedule(Duration.create(delay,TimeUnit.MILLISECONDS),Duration.create(interval, TimeUnit.MILLISECONDS)(checkStatus());
当 checkStatus 情况为真时,我如何停止调度程序。