Operator Serializer

IBMStreams com.ibm.streamsx.inet Toolkit > com.ibm.streamsx.inet 3.4.0 > com.ibm.streamsx.inet.util > Serializer

Serialization operator. The tuples of this single input port are serialized in network byte order and the serialization result is emitted as a blob or rstring to the output port. The serialization result data block may start with type information. The occurrence of the type information can be controlled with parameters iterateTypeListCount and activateTypeList. The logic for the generation of the type list combines both parameters with an logical or. The integrated type information can be used at the receiver side to validate the transmission configuration.

Summary

Ports
This operator has 1 input port and 1 output port.
Windowing
This operator does not accept any windowing configurations.
Parameters
This operator supports 3 parameters.

Optional: activateTypeList, inputAttributes, iterateTypeListCount

Metrics
This operator does not report any metrics.

Properties

Implementation
C++
Threading
Always - Operator always provides a single threaded execution context.

Input Ports

Ports (0)

The tuples of this single input port are serialized and the serialization result is emitted as a blob to the output port.

Properties

Output Ports

Assignments
This operator allows any SPL expression of the correct type to be assigned to output attributes. Attributes not assigned in the output clause will be automatically assigned from the attributes of the input ports that have the same name and type. If there is no such input attribute, an error is reported at compile-time.
Output Functions
SerializeFunctions
<any T> T AsIs(T)

The default function for output attributes. This function assigns the output attribute to the value of the input attribute with the same name.

<any T> T serialized()

Serialized data. The type must be of rstring or blob.

uint64 sequence()

Sequence number of the output tuple. Starts with zero. Must be of type uint64.

Ports (0)

The output port with the serialized data. With output function serialized the serialized data can be assigned to output attributes. With output function sequence the sequence number can be assigned to an attribute. All other attributes are assigned from input tuple.

Properties

Parameters

This operator supports 3 parameters.

Optional: activateTypeList, inputAttributes, iterateTypeListCount

activateTypeList

If this parameter is true, a type list information is inserted into the serialized data block. Default is false.

Properties

inputAttributes

This parameter specifies the attributes of the input stream to serialize. If this parameter is absent, all input attributes will be included in the serialized output blob/rstring.

Note: The serialization sequence of the input attributes corresponds to the sequence of this parameter. If this parameter is absent, the attribute sequence of the input tuple is significant.

Properties

iterateTypeListCount

This parameter controls how often the type list information is embedded in the serialization data block. The operator inserts a type list information all iterateTypeListCount tuples. If the value is zero, no type list information is inserted. Default is 100.

Properties