Class SerDeState

java.lang.Object
com.twitter.chill.SerDeState

public class SerDeState extends Object
This holds a Kryo Instance, Input and Output so that these objects can be pooled and no reallocated on each serialization.
  • Field Details

    • kryo

      protected final com.esotericsoftware.kryo.kryo5.Kryo kryo
    • input

      protected final com.esotericsoftware.kryo.kryo5.io.Input input
    • output

      protected final com.esotericsoftware.kryo.kryo5.io.Output output
  • Constructor Details

    • SerDeState

      protected SerDeState(com.esotericsoftware.kryo.kryo5.Kryo k, com.esotericsoftware.kryo.kryo5.io.Input in, com.esotericsoftware.kryo.kryo5.io.Output out)
  • Method Details

    • clear

      public void clear()
      Call this when to reset the state to the initial state
    • setInput

      public void setInput(byte[] in)
    • setInput

      public void setInput(byte[] in, int offset, int count)
    • setInput

      public void setInput(InputStream in)
    • numOfWrittenBytes

      public int numOfWrittenBytes()
    • numOfReadBytes

      public int numOfReadBytes()
    • readObject

      public <T> T readObject(Class<T> cls)
    • readClassAndObject

      public Object readClassAndObject()
    • writeObject

      public void writeObject(Object o)
    • writeClassAndObject

      public void writeClassAndObject(Object o)
    • outputToBytes

      public byte[] outputToBytes()
    • writeOutputTo

      public void writeOutputTo(OutputStream os) throws IOException
      Throws:
      IOException
    • hasRegistration

      public boolean hasRegistration(Class obj)