T
- type of eventspublic class ForkPoolStage<T> extends AbstractEStage<T>
ForkJoinPool
to submit tasks. The advantage is that underlying workers
have separate queues instead of sharing one. The queues are load
balanced with work stealing.
The pool is provided to the constructor, so multiple stages may use the same pool.
Some advantage in throughput over other stage implementations should be seen
when one wake stage is submitting to another using the same
WakeSharedPool
. In this case, the new event may be executed
directly by that thread.
Constructor and Description |
---|
ForkPoolStage(EventHandler<T> handler,
WakeSharedPool sharedPool) |
ForkPoolStage(String stageName,
EventHandler<T> handler,
WakeSharedPool sharedPool) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
onNext(T value)
Handles an event.
|
getInMeter, getOutMeter, isClosed, toString
@Inject public ForkPoolStage(String stageName, EventHandler<T> handler, WakeSharedPool sharedPool)
@Inject public ForkPoolStage(EventHandler<T> handler, WakeSharedPool sharedPool)
Copyright © 2017 The Apache Software Foundation. All rights reserved.