Interface SmartExecutor

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
SmartExecutor.Direct, SmartExecutor.Limited, SmartExecutor.NonClosing, SmartExecutor.Pooled

public interface SmartExecutor extends AutoCloseable
Utilities for executors and sizing them. Big fat note: Do not use this class outside of resolver. This and related classes are not meant as "drop in replacement" for Jave Executors, is used in very controlled fashion only.
Since:
2.0.11
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Direct executor (caller executes).
    static class 
    Limited executor, where the actual goal is to protect accessed resource, like when virtual threads are being used, so the "pool" itself does not provide any kind of back-pressure.
    static class 
    Wrapper to prevent closing.
    static class 
    Pooled executor backed by ExecutorService.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Shut down this instance (ideally used in try-with-resource construct).
    void
    submit(Runnable runnable)
    Submits a Runnable to execution.
    <T> Future<T>
    submit(Callable<T> callable)
    Submits a Callable to execution, returns a CompletableFuture.