任务相关
This commit is contained in:
parent
07aeee82d0
commit
a23584f415
|
@ -102,6 +102,15 @@ public class Room implements AutoCloseable {
|
|||
public void stop() {
|
||||
status.set(false);
|
||||
cancelTask();
|
||||
futures.forEach((key, value) -> {
|
||||
try {
|
||||
if (!value.isShutdown()) {
|
||||
value.shutdownNow();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("error::", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,7 +131,6 @@ public class Room implements AutoCloseable {
|
|||
}
|
||||
|
||||
|
||||
|
||||
// 启动定时任务
|
||||
private void startTask() {
|
||||
if (future == null || future.isCancelled()) {
|
||||
|
@ -197,8 +205,9 @@ public class Room implements AutoCloseable {
|
|||
public boolean isRunning() {
|
||||
return status.get();
|
||||
}
|
||||
|
||||
//统一推送方法
|
||||
protected void pushStatus(String resourceId){
|
||||
protected void pushStatus(String resourceId) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user