Class SerialExecutor
- java.lang.Object
-
- io.fabric8.kubernetes.client.utils.internal.SerialExecutor
-
- All Implemented Interfaces:
Executor
public class SerialExecutor extends Object implements Executor
SeeExecutor
docs
Effectively creates a derived single thread executor, runnable tasks are executed in the order they are added. This is a replacement for Executors.newSingleThreadExecutor() that uses threads in a non-dedicated way
Added shutdown support
-
-
Constructor Summary
Constructors Constructor Description SerialExecutor(Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Runnable r)
Executes the given command at some time in the future.boolean
isShutdown()
protected void
scheduleNext()
void
shutdownNow()
Shutdown the executor without executing any more tasks.
-
-
-
Constructor Detail
-
SerialExecutor
public SerialExecutor(Executor executor)
-
-
Method Detail
-
execute
public void execute(Runnable r)
Executes the given command at some time in the future. Unlike a normalExecutor
, it will not throw aRejectedExecutionException
-
scheduleNext
protected void scheduleNext()
-
shutdownNow
public void shutdownNow()
Shutdown the executor without executing any more tasks.The the current task will be interrupting if it is not the thread that initiated the shutdown.
-
isShutdown
public boolean isShutdown()
-
-