Class JavaPoolAsyncExec

java.lang.Object
org.apache.polaris.nosql.async.java.JavaPoolAsyncExec
All Implemented Interfaces:
AutoCloseable, org.apache.polaris.nosql.async.AsyncExec

@ApplicationScoped public class JavaPoolAsyncExec extends Object implements org.apache.polaris.nosql.async.AsyncExec, AutoCloseable
CDI ApplicationScoped Java executor service based AsyncExec implementation using ScheduledThreadPoolExecutor for the timers, backed by a Java thread pool to execute blocking tasks.
  • Field Details

  • Constructor Details

    • JavaPoolAsyncExec

      public JavaPoolAsyncExec()
  • Method Details

    • close

      @PreDestroy public void close()
      Specified by:
      close in interface AutoCloseable
    • schedule

      public <R> org.apache.polaris.nosql.async.Cancelable<R> schedule(Callable<R> callable, Duration delay)
      Specified by:
      schedule in interface org.apache.polaris.nosql.async.AsyncExec
    • schedulePeriodic

      public org.apache.polaris.nosql.async.Cancelable<Void> schedulePeriodic(Runnable runnable, Duration initialDelay, Duration delay)
      Specified by:
      schedulePeriodic in interface org.apache.polaris.nosql.async.AsyncExec
    • toString

      public String toString()
      Overrides:
      toString in class Object