Class SerializerManager


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

      • register

        public void register​(java.lang.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​(java.lang.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​(java.lang.String runtimeEdgeId)
        Return the serializer for the specified runtime edge.
        Parameters:
        runtimeEdgeId - id of the runtime edge.
        Returns:
        the corresponding serializer.