Package com.emc.mongoose.base.concurrent
Interface SingleTaskExecutor
-
- All Superinterfaces:
java.lang.AutoCloseable,java.util.concurrent.Executor,TaskExecutor
- All Known Implementing Classes:
SingleTaskExecutorImpl
public interface SingleTaskExecutor extends TaskExecutor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanstop(java.lang.Runnable task)Atomically stop the active taskjava.lang.Runnabletask()-
Methods inherited from interface com.emc.mongoose.base.concurrent.TaskExecutor
close
-
-
-
-
Method Detail
-
task
java.lang.Runnable task()
- Returns:
- the active task instance, null if no active task is being executed at the moment
-
stop
boolean stop(java.lang.Runnable task)
Atomically stop the active task- Parameters:
task- the task to check if it is still active- Returns:
- true if the task was still active and stopped, false otherwise
-
-