Class SmartExecutor.Limited

  • All Implemented Interfaces:
    java.lang.AutoCloseable, SmartExecutor
    Enclosing interface:
    SmartExecutor

    public static class SmartExecutor.Limited
    extends java.lang.Object
    implements SmartExecutor
    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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Shut down this instance (ideally used in try-with-resource construct).
      void submit​(java.lang.Runnable runnable)
      Submits a Runnable to execution.
      <T> java.util.concurrent.Future<T> submit​(java.util.concurrent.Callable<T> callable)
      Submits a Callable to execution, returns a CompletableFuture.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • submit

        public void submit​(java.lang.Runnable runnable)
        Description copied from interface: SmartExecutor
        Submits a Runnable to execution.
        Specified by:
        submit in interface SmartExecutor
      • submit

        public <T> java.util.concurrent.Future<T> submit​(java.util.concurrent.Callable<T> callable)
        Description copied from interface: SmartExecutor
        Submits a Callable to execution, returns a CompletableFuture.
        Specified by:
        submit in interface SmartExecutor
      • close

        public void close()
        Description copied from interface: SmartExecutor
        Shut down this instance (ideally used in try-with-resource construct).
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface SmartExecutor