public abstract class AbstractCallablePool<T> extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractCallablePool.NamedThreadFactory |
Constructor and Description |
---|
AbstractCallablePool(short nbThreads) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
afterCall(List<T> ret) |
void |
close() |
protected abstract Callable<T> |
getCallable(int i) |
protected abstract T |
getErrorStatus()
Value to return when there was an exception during execution
|
int |
getNbThreads() |
protected abstract String |
getThreadPrefix() |
protected List<T> |
runPool() |
CompletableFuture<List<T>> |
start() |
public AbstractCallablePool(short nbThreads)
protected abstract T getErrorStatus()
protected abstract Callable<T> getCallable(int i)
protected abstract String getThreadPrefix()
public int getNbThreads()
public CompletableFuture<List<T>> start()
protected List<T> runPool() throws InterruptedException
InterruptedException
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2017 Nuxeo. All rights reserved.