Class SerialExecutor
- java.lang.Object
-
- com.google.cloud.pubsublite.internal.SerialExecutor
-
- All Implemented Interfaces:
AutoCloseable
,Executor
public final class SerialExecutor extends Object implements AutoCloseable, Executor
An executor that runs tasks sequentially.
-
-
Constructor Summary
Constructors Constructor Description SerialExecutor(Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Shuts down the executor.void
execute(Runnable r)
void
waitUntilInactive()
Waits until there are no active tasks.
-
-
-
Constructor Detail
-
SerialExecutor
public SerialExecutor(Executor executor)
-
-
Method Detail
-
waitUntilInactive
public void waitUntilInactive()
Waits until there are no active tasks.
-
close
public void close()
Shuts down the executor. No subsequent tasks will run, but any running task will be left to complete.- Specified by:
close
in interfaceAutoCloseable
-
-