IBM Streams 4.2
Advanced operator implementation
Advanced operator implementation techniques provide additional runtime operator control.
- Blocking and shutdown handling
SPL provides functions to block and shut down operator processing elements safely. - Punctuation processing
Punctuation markers in SPL create boundaries. Window punctuation create boundaries within a stream that can be used for creating user-defined windows. Final punctuation is used to mark the end of streams. - Dynamic stream importing and exporting
The Export operator exports a stream using a set of export properties, which can be modified at run time. Similarly, the Import operator is used to import a stream using an import subscription that is defined over the export properties. Import subscriptions can also be changed at run time. - Logging and tracing
When you develop C++ primitive operators and native functions, you use the SPLAPPLOG macro to write messages to the IBM® Streams product log location. You use the SPLAPPTRC macro to create a trace in the PE trace files. - Checkpointing
Checkpointing is the process of persisting operator state at run time to allow recovery from a failure. In case of failure, the operator can be restarted by resetting from the checkpointed state. - Window handling
The SPL language run time provides APIs for building window-based operators. - Multi-threading and operator fusion considerations
SPL operators can potentially run in a multi-threaded context, where the process functions of the operators are invoked concurrently. SPL provides a set of utility classes that handle threads, locks, and conditional variables to protect against concurrent access. - Metrics access
Metrics are simple counters that are maintained at run time, which can be read from outside of a running job to monitor statistics. - Accessing paths at run time
The SPL runtime APIs provide functions to access special paths at run time. These functions are provided as part of the SPL::ProcessingElement class. - Using the reflective type system
The types ValueHandle and Meta:BaseType provide support for reflection. The former type is a handle to a value of an SPL type. The latter type is a meta-type that represents an SPL type.
Parent topic: Developing C++ primitive operators