Class SerializerManager


  • public final class SerializerManager
    extends Object
    Mapping from RuntimeEdgeId to Serializer.
    • Method Detail

      • register

        public void register​(String runtimeEdgeId,
                             EncoderFactory encoderFactory,
                             DecoderFactory decoderFactory)
        Register a encoderFactory for runtime edge. This method regards that compression and decompression property are empty.
        Parameters:
        runtimeEdgeId - id of the runtime edge.
        encoderFactory - the corresponding encoder factory.
        decoderFactory - the corresponding decoder factory.
      • register

        public void register​(String runtimeEdgeId,
                             EncoderFactory encoderFactory,
                             DecoderFactory decoderFactory,
                             @Nullable
                             CompressionProperty.Value compressionProperty,
                             @Nullable
                             CompressionProperty.Value decompressionProperty)
        Register a encoderFactory for runtime edge.
        Parameters:
        runtimeEdgeId - id of the runtime edge.
        encoderFactory - the corresponding encoder factory.
        decoderFactory - the corresponding decoder factory.
        compressionProperty - compression property, or null not to enable compression
        decompressionProperty - decompression property, or null not to enable decompression
      • getSerializer

        public Serializer getSerializer​(String runtimeEdgeId)
        Return the serializer for the specified runtime edge.
        Parameters:
        runtimeEdgeId - id of the runtime edge.
        Returns:
        the corresponding serializer.