Class AbstractEhcacheSerializer<T>

java.lang.Object
io.debezium.connector.oracle.logminer.processor.ehcache.serialization.AbstractEhcacheSerializer<T>
All Implemented Interfaces:
org.ehcache.spi.serialization.Serializer<T>
Direct Known Subclasses:
EhcacheTransactionSerializer, LogMinerEventSerializer

public abstract class AbstractEhcacheSerializer<T> extends Object implements org.ehcache.spi.serialization.Serializer<T>
An abstract implementation of the Ehcache Serializer interface.
Author:
Chris Cranford
  • Constructor Details

    • AbstractEhcacheSerializer

      public AbstractEhcacheSerializer()
  • Method Details

    • serialize

      public ByteBuffer serialize(T object) throws org.ehcache.spi.serialization.SerializerException
      Specified by:
      serialize in interface org.ehcache.spi.serialization.Serializer<T>
      Throws:
      org.ehcache.spi.serialization.SerializerException
    • read

      public T read(ByteBuffer buffer) throws ClassNotFoundException, org.ehcache.spi.serialization.SerializerException
      Specified by:
      read in interface org.ehcache.spi.serialization.Serializer<T>
      Throws:
      ClassNotFoundException
      org.ehcache.spi.serialization.SerializerException
    • equals

      public boolean equals(T object, ByteBuffer buffer) throws ClassNotFoundException, org.ehcache.spi.serialization.SerializerException
      Specified by:
      equals in interface org.ehcache.spi.serialization.Serializer<T>
      Throws:
      ClassNotFoundException
      org.ehcache.spi.serialization.SerializerException
    • serialize

      protected abstract void serialize(T object, SerializerOutputStream stream) throws IOException
      Serialize the specified object to the output stream.
      Parameters:
      object - the object to be serialized, should not be null
      stream - the output stream to write to, should not be null
      Throws:
      IOException - when a write operation fails on the output stream
    • deserialize

      protected abstract T deserialize(SerializerInputStream stream) throws IOException
      Deserializes the data within the input stream.
      Parameters:
      stream - the input stream to read, should not be null
      Returns:
      the object deserialized from the input stream, should not be null
      Throws:
      IOException - when a read operation fails on the input stream