Class InstantAsLongEncoding

java.lang.Object
org.apache.avro.reflect.CustomEncoding<Instant>
org.nuxeo.ecm.core.bulk.io.InstantAsLongEncoding

public class InstantAsLongEncoding extends org.apache.avro.reflect.CustomEncoding<Instant>
This CustomEncoding encodes/decodes Instant to a long (time in milliseconds) before encoding it in Avro format.
Since:
10.3
  • Field Details

  • Constructor Details

    • InstantAsLongEncoding

      public InstantAsLongEncoding()
  • Method Details

    • write

      protected void write(Object o, org.apache.avro.io.Encoder encoder) throws IOException
      Specified by:
      write in class org.apache.avro.reflect.CustomEncoding<Instant>
      Throws:
      IOException
    • read

      protected Instant read(Object o, org.apache.avro.io.Decoder decoder) throws IOException
      Specified by:
      read in class org.apache.avro.reflect.CustomEncoding<Instant>
      Throws:
      IOException