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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.polaris.nosql.async.AsyncExec
schedule, schedulePeriodic, submit
-
Field Details
-
EXECUTOR_THREAD_NAME_PREFIX
- See Also:
-
SCHEDULER_THREAD_NAME_PREFIX
- See Also:
-
-
Constructor Details
-
JavaPoolAsyncExec
public JavaPoolAsyncExec()
-
-
Method Details
-
close
@PreDestroy public void close()- Specified by:
closein interfaceAutoCloseable
-
schedule
public <R> org.apache.polaris.nosql.async.Cancelable<R> schedule(Callable<R> callable, Duration delay) - Specified by:
schedulein interfaceorg.apache.polaris.nosql.async.AsyncExec
-
schedulePeriodic
public org.apache.polaris.nosql.async.Cancelable<Void> schedulePeriodic(Runnable runnable, Duration initialDelay, Duration delay) - Specified by:
schedulePeriodicin interfaceorg.apache.polaris.nosql.async.AsyncExec
-
toString
-