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 Details

    • SerialExecutor

      public SerialExecutor(Executor executor)
  • Method Details

    • 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 interface AutoCloseable
    • execute

      public void execute(Runnable r)
      Specified by:
      execute in interface Executor