public class OutputCollector extends java.lang.Object implements IOutputCollector
Constructor and Description |
---|
OutputCollector(IOutputCollector delegate) |
Modifier and Type | Method and Description |
---|---|
void |
ack(Tuple input) |
java.util.List<java.lang.Integer> |
emit(java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
Emits a new tuple to the default stream anchored on a group of input tuples.
|
java.util.List<java.lang.Integer> |
emit(java.util.List<java.lang.Object> tuple)
Emits a new unanchored tuple to the default stream.
|
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
Returns the task ids that received the tuples.
|
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.List<java.lang.Object> tuple)
Emits a new unanchored tuple to the specified stream.
|
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a new tuple to a specific stream with a single anchor.
|
java.util.List<java.lang.Integer> |
emit(Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a new tuple to the default stream anchored on a single tuple.
|
void |
emitDirect(int taskId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the default stream.
|
void |
emitDirect(int taskId,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the default stream.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple) |
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the specified stream.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the specified stream.
|
void |
emitDirect(int taskId,
Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the default stream.
|
void |
fail(Tuple input) |
void |
reportError(java.lang.Throwable error) |
public OutputCollector(IOutputCollector delegate)
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, Tuple anchor, java.util.List<java.lang.Object> tuple)
streamId
- the stream to emit toanchor
- the tuple to anchor totuple
- the new output tuple from this boltpublic java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple)
streamId
- the stream to emit totuple
- the new output tuple from this boltpublic java.util.List<java.lang.Integer> emit(java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
anchors
- the tuples to anchor totuple
- the new output tuple from this boltpublic java.util.List<java.lang.Integer> emit(Tuple anchor, java.util.List<java.lang.Object> tuple)
anchor
- the tuple to anchor totuple
- the new output tuple from this boltpublic java.util.List<java.lang.Integer> emit(java.util.List<java.lang.Object> tuple)
tuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.lang.String streamId, Tuple anchor, java.util.List<java.lang.Object> tuple)
taskId
- the taskId to send the new tuple tostreamId
- the stream to send the tuple on. It must be declared as a direct stream in the topology definition.anchor
- the tuple to anchor totuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.lang.String streamId, java.util.List<java.lang.Object> tuple)
taskId
- the taskId to send the new tuple tostreamId
- the stream to send the tuple on. It must be declared as a direct stream in the topology definition.tuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
The default stream must be declared as direct in the topology definition. See OutputDeclarer#declare for how this is done when defining topologies in Java.
taskId
- the taskId to send the new tuple toanchors
- the tuples to anchor totuple
- the new output tuple from this boltpublic void emitDirect(int taskId, Tuple anchor, java.util.List<java.lang.Object> tuple)
The default stream must be declared as direct in the topology definition. See OutputDeclarer#declare for how this is done when defining topologies in Java.
taskId
- the taskId to send the new tuple toanchor
- the tuple to anchor totuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.util.List<java.lang.Object> tuple)
The default stream must be declared as direct in the topology definition. See OutputDeclarer#declare for how this is done when defining topologies in Java.
Note that this method does not use anchors, so downstream failures won't affect the failure status of any spout tuples.
taskId
- the taskId to send the new tuple totuple
- the new output tuple from this boltpublic java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
IOutputCollector
emit
in interface IOutputCollector
public void emitDirect(int taskId, java.lang.String streamId, java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
emitDirect
in interface IOutputCollector
public void ack(Tuple input)
ack
in interface IOutputCollector
public void fail(Tuple input)
fail
in interface IOutputCollector
public void reportError(java.lang.Throwable error)
reportError
in interface IErrorReporter