| Modifier and Type | Class and Description |
|---|---|
| public static class | XAThreadPool.MultiRunner
Pooled thread wrapper which allows reuse of the same thread |
| Modifier and Type | Field and Description |
|---|---|
| private final ExecutorService |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized XAThreadPool. | Returns: a MultiRunner which wraps the reserved threadReserve a thread from the pool |
| public synchronized void |
| executor | back to summary |
|---|---|
| private final ExecutorService executor | |
| XAThreadPool | back to summary |
|---|---|
| public XAThreadPool() | |
| getMultiRunner | back to summary |
|---|---|
| public synchronized XAThreadPool. Reserve a thread from the pool
| |
| shutdown | back to summary |
|---|---|
| public synchronized void shutdown() Shutdown the thread pool and release all resources | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile Callable | |
| private final CyclicBarrier | |
| private volatile Exception | |
| private volatile boolean | |
| private volatile Object | |
| private final CyclicBarrier |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public void | |
| public void |
| callable | back to summary |
|---|---|
| private volatile Callable<V> callable | |
| endBarrier | back to summary |
|---|---|
| private final CyclicBarrier endBarrier | |
| exception | back to summary |
|---|---|
| private volatile Exception exception | |
| released | back to summary |
|---|---|
| private volatile boolean released | |
| result | back to summary |
|---|---|
| private volatile Object result | |
| startBarrier | back to summary |
|---|---|
| private final CyclicBarrier startBarrier | |
| MultiRunner | back to summary |
|---|---|
| private MultiRunner() | |
| execute | back to summary |
|---|---|
| public Object execute(Callable<V> callable) throws ExecutionException, InterruptedException Execute a Callable on the wrapped thread and return its result
| |
| release | back to summary |
|---|---|
| public void release() Release the wrapped thread back the the containing thread pool | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |