T
- typepublic final class SingleThreadStage<T> extends AbstractEStage<T>
Constructor and Description |
---|
SingleThreadStage(EventHandler<T> handler,
int capacity)
Constructs a single thread stage.
|
SingleThreadStage(String name,
EventHandler<T> handler,
int capacity)
Constructs a single thread stage.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stage.
|
void |
onNext(T value)
Puts the value to the queue, which will be processed by the handler later.
|
getInMeter, getOutMeter
@Inject public SingleThreadStage(EventHandler<T> handler, int capacity)
handler
- the event handler to executecapacity
- the queue capacity@Inject public SingleThreadStage(String name, EventHandler<T> handler, int capacity)
name
- the stage namehandler
- the event handler to executecapacity
- the queue capacitypublic void onNext(T value)
value
- the valueIllegalStateException
Copyright © 2016 The Apache Software Foundation. All rights reserved.