Class AbstractSerializer<T>

  • All Implemented Interfaces:
    io.pravega.client.stream.Serializer<T>

    public abstract class AbstractSerializer<T>
    extends java.lang.Object
    • Field Summary

      • Fields inherited from interface io.pravega.client.stream.Serializer

        MAX_EVENT_SIZE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractSerializer​(java.lang.String groupId, io.pravega.schemaregistry.client.SchemaRegistryClient client, Schema<T> schema, Encoder encoder, boolean registerSchema, boolean encodeHeader)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T deserialize​(java.nio.ByteBuffer serializedValue)  
      Encoder getEncoder()  
      java.nio.ByteBuffer serialize​(T obj)  
      protected abstract void serialize​(T var, io.pravega.schemaregistry.contract.data.SchemaInfo schema, java.io.OutputStream outputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractSerializer

        protected AbstractSerializer​(java.lang.String groupId,
                                     io.pravega.schemaregistry.client.SchemaRegistryClient client,
                                     Schema<T> schema,
                                     Encoder encoder,
                                     boolean registerSchema,
                                     boolean encodeHeader)
    • Method Detail

      • serialize

        public java.nio.ByteBuffer serialize​(T obj)
      • serialize

        protected abstract void serialize​(T var,
                                          io.pravega.schemaregistry.contract.data.SchemaInfo schema,
                                          java.io.OutputStream outputStream)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getEncoder

        public Encoder getEncoder()
      • deserialize

        public final T deserialize​(java.nio.ByteBuffer serializedValue)
        Specified by:
        deserialize in interface io.pravega.client.stream.Serializer<T>