@@ -20,7 +20,8 @@ public OutputCollector(IOutputCollector delegate) {
20
20
}
21
21
22
22
/**
23
- * Emits a new tuple to a specific stream with a single anchor.
23
+ * Emits a new tuple to a specific stream with a single anchor. The emitted values must be
24
+ * immutable.
24
25
*
25
26
* @param streamId the stream to emit to
26
27
* @param anchor the tuple to anchor to
@@ -34,7 +35,8 @@ public List<Integer> emit(String streamId, Tuple anchor, List<Object> tuple) {
34
35
/**
35
36
* Emits a new unanchored tuple to the specified stream. Because it's unanchored,
36
37
* if a failure happens downstream, this new tuple won't affect whether any
37
- * spout tuples are considered failed or not.
38
+ * spout tuples are considered failed or not. The emitted values must be
39
+ * immutable.
38
40
*
39
41
* @param streamId the stream to emit to
40
42
* @param tuple the new output tuple from this bolt
@@ -45,7 +47,8 @@ public List<Integer> emit(String streamId, List<Object> tuple) {
45
47
}
46
48
47
49
/**
48
- * Emits a new tuple to the default stream anchored on a group of input tuples.
50
+ * Emits a new tuple to the default stream anchored on a group of input tuples. The emitted
51
+ * values must be immutable.
49
52
*
50
53
* @param anchors the tuples to anchor to
51
54
* @param tuple the new output tuple from this bolt
@@ -57,7 +60,8 @@ public List<Integer> emit(Collection<Tuple> anchors, List<Object> tuple) {
57
60
58
61
59
62
/**
60
- * Emits a new tuple to the default stream anchored on a single tuple.
63
+ * Emits a new tuple to the default stream anchored on a single tuple. The emitted values must be
64
+ * immutable.
61
65
*
62
66
* @param anchor the tuple to anchor to
63
67
* @param tuple the new output tuple from this bolt
@@ -70,7 +74,8 @@ public List<Integer> emit(Tuple anchor, List<Object> tuple) {
70
74
/**
71
75
* Emits a new unanchored tuple to the default stream. Beacuse it's unanchored,
72
76
* if a failure happens downstream, this new tuple won't affect whether any
73
- * spout tuples are considered failed or not.
77
+ * spout tuples are considered failed or not. The emitted values must be
78
+ * immutable.
74
79
*
75
80
* @param tuple the new output tuple from this bolt
76
81
* @return the list of task ids that this new tuple was sent to
@@ -84,7 +89,8 @@ public List<Integer> emit(List<Object> tuple) {
84
89
* If the target bolt does not subscribe to this bolt using a direct grouping,
85
90
* the tuple will not be sent. If the specified output stream is not declared
86
91
* as direct, or the target bolt subscribes with a non-direct grouping,
87
- * an error will occur at runtime.
92
+ * an error will occur at runtime. The emitted values must be
93
+ * immutable.
88
94
*
89
95
* @param taskId the taskId to send the new tuple to
90
96
* @param streamId the stream to send the tuple on. It must be declared as a direct stream in the topology definition.
@@ -102,6 +108,7 @@ public void emitDirect(int taskId, String streamId, Tuple anchor, List<Object> t
102
108
* as direct, or the target bolt subscribes with a non-direct grouping,
103
109
* an error will occur at runtime. Note that this method does not use anchors,
104
110
* so downstream failures won't affect the failure status of any spout tuples.
111
+ * The emitted values must be immutable.
105
112
*
106
113
* @param taskId the taskId to send the new tuple to
107
114
* @param streamId the stream to send the tuple on. It must be declared as a direct stream in the topology definition.
@@ -116,7 +123,8 @@ public void emitDirect(int taskId, String streamId, List<Object> tuple) {
116
123
* If the target bolt does not subscribe to this bolt using a direct grouping,
117
124
* the tuple will not be sent. If the specified output stream is not declared
118
125
* as direct, or the target bolt subscribes with a non-direct grouping,
119
- * an error will occur at runtime.
126
+ * an error will occur at runtime. The emitted values must be
127
+ * immutable.
120
128
*
121
129
* <p>The default stream must be declared as direct in the topology definition.
122
130
* See OutputDeclarer#declare for how this is done when defining topologies
@@ -135,7 +143,8 @@ public void emitDirect(int taskId, Collection<Tuple> anchors, List<Object> tuple
135
143
* If the target bolt does not subscribe to this bolt using a direct grouping,
136
144
* the tuple will not be sent. If the specified output stream is not declared
137
145
* as direct, or the target bolt subscribes with a non-direct grouping,
138
- * an error will occur at runtime.
146
+ * an error will occur at runtime. The emitted values must be
147
+ * immutable.
139
148
*
140
149
* <p>The default stream must be declared as direct in the topology definition.
141
150
* See OutputDeclarer#declare for how this is done when defining topologies
@@ -155,7 +164,8 @@ public void emitDirect(int taskId, Tuple anchor, List<Object> tuple) {
155
164
* If the target bolt does not subscribe to this bolt using a direct grouping,
156
165
* the tuple will not be sent. If the specified output stream is not declared
157
166
* as direct, or the target bolt subscribes with a non-direct grouping,
158
- * an error will occur at runtime.
167
+ * an error will occur at runtime. The emitted values must be
168
+ * immutable.
159
169
*
160
170
* <p>The default stream must be declared as direct in the topology definition.
161
171
* See OutputDeclarer#declare for how this is done when defining topologies
0 commit comments