Class SmartExecutor.Limited
- java.lang.Object
-
- org.eclipse.aether.util.concurrency.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.aether.util.concurrency.SmartExecutor
SmartExecutor.Direct, SmartExecutor.Limited, SmartExecutor.NonClosing, SmartExecutor.Pooled
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Shut down this instance (ideally used in try-with-resource construct).voidsubmit(java.lang.Runnable runnable)Submits aRunnableto execution.<T> java.util.concurrent.Future<T>submit(java.util.concurrent.Callable<T> callable)Submits aCallableto execution, returns aCompletableFuture.
-
-
-
Method Detail
-
submit
public void submit(java.lang.Runnable runnable)
Description copied from interface:SmartExecutorSubmits aRunnableto execution.- Specified by:
submitin interfaceSmartExecutor
-
submit
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> callable)
Description copied from interface:SmartExecutorSubmits aCallableto execution, returns aCompletableFuture.- Specified by:
submitin interfaceSmartExecutor
-
close
public void close()
Description copied from interface:SmartExecutorShut down this instance (ideally used in try-with-resource construct).- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceSmartExecutor
-
-