public interface AsyncProcessorAwaitManager extends StaticService
Exchange
s are being handed over from one thread to another, while
the callee thread is blocked waiting for the other threads to complete, before it can continue.
This manager offers insight into the state, and allow to force stuck exchanges to be continued and for blocked threads
to be unblocked, which may happen in case of severe malfunctions (such as the system runs out of memory, a 3rd party
never responding, or a timeout not triggering, etc).Modifier and Type | Interface and Description |
---|---|
static interface |
AsyncProcessorAwaitManager.AwaitThread
Information about the thread and exchange that are inflight.
|
static interface |
AsyncProcessorAwaitManager.Statistics
Utilization statistics of the this manager.
|
Modifier and Type | Method and Description |
---|---|
Collection<AsyncProcessorAwaitManager.AwaitThread> |
browse()
A read-only browser of the
AsyncProcessorAwaitManager.AwaitThread s that are currently inflight. |
AsyncProcessorAwaitManager.Statistics |
getStatistics()
Gets the utilization statistics of this manager
|
void |
interrupt(Exchange exchange)
To interrupt an exchange which may seem as stuck, to force the exchange to continue,
allowing any blocking thread to be released.
|
void |
interrupt(String exchangeId)
To interrupt an exchange which may seem as stuck, to force the exchange to continue,
allowing any blocking thread to be released.
|
boolean |
isInterruptThreadsWhileStopping()
Whether to interrupt any blocking threads during stopping.
|
void |
process(AsyncProcessor processor,
Exchange exchange)
Process the given exchange sychronously.
|
void |
setInterruptThreadsWhileStopping(boolean interruptThreadsWhileStopping)
Sets whether to interrupt any blocking threads during stopping.
|
int |
size()
Number of threads that are blocked waiting for other threads to trigger the callback when they are done processing
the exchange.
|
void process(AsyncProcessor processor, Exchange exchange)
processor
- the async processor to callexchange
- the exchange to processint size()
Collection<AsyncProcessorAwaitManager.AwaitThread> browse()
AsyncProcessorAwaitManager.AwaitThread
s that are currently inflight.void interrupt(String exchangeId)
exchangeId
- the exchange id to interrupt.void interrupt(Exchange exchange)
exchange
- the exchange to interrupt.boolean isInterruptThreadsWhileStopping()
void setInterruptThreadsWhileStopping(boolean interruptThreadsWhileStopping)
AsyncProcessorAwaitManager.Statistics getStatistics()
Apache Camel