...
Code Block | ||
---|---|---|
| ||
operator ODLProject(outputMode ="MODIFIED_INPUT", minInputPorts = 1, maxInputPorts = 1){ validate { return true; } //... } |
Event methods
These methods are automatically called when events occur. The processNext-method is the most important event method and is called whenever a new stream element is received. The type of a stream element can be Tuple, KeyValueObject or other subtypes of IStreamObject.
Code Block | ||
---|---|---|
| ||
operator ODLSelect(outputMode = "INPUT", minInputPorts = 1, maxInputPorts = 1){
on processNext(Tuple tuple, int port) {
if (predicate.evaluate(tuple)) {
sendStreamElement(tuple);
}
}
on processPunctuation(IPunctuation punctuation, int port) {
sendPunctuation(punctuation);
}
//...
} |
The following table shows an overview of available event methods.
Event method | Description |
---|---|
processNext(IStreamObject object, int port) |
|
processPunctuation(IPunctuation punctuation, int port) |
|
processOpen() |
|
processClose() |
|
processDone() |
|
processDone(int port) |
|
createOutputSchema (int port) |
|
sourceSubscribed() |
|
sourceUnsubscribed() |
|
ao_init() |
|
po_init() |
|