trait AdaptTProtocol extends TProtocol with LazyTProtocol
An extension to the TProtocol to enable adaptive reading. Learn from the access pattern to skip unused fields and avoid creating them, thus making parse faster and reduce GC.
Also enable caching of a backing Array[Byte] so we can serialize quickly what we just deserialized if unchanged.
- Alphabetic
- By Inheritance
- AdaptTProtocol
- LazyTProtocol
- TProtocol
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def adaptContext: AdaptContext
Get a context that provides facilities for helping with Adaptive Scrooge decoding.
- abstract def buffer: Array[Byte]
Return the underlying Array[Byte] used in reading
Return the underlying Array[Byte] used in reading
- Definition Classes
- LazyTProtocol
- abstract def decodeBool(arr: Array[Byte], offset: Int): Boolean
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def decodeByte(arr: Array[Byte], offset: Int): Byte
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def decodeDouble(arr: Array[Byte], offset: Int): Double
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def decodeI16(arr: Array[Byte], offset: Int): Short
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def decodeI32(arr: Array[Byte], offset: Int): Int
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def decodeI64(arr: Array[Byte], offset: Int): Long
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def decodeString(arr: Array[Byte], offset: Int): String
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
Given a backing Array[Byte] and offset, decode this type from it using this TProtocol's deserializer
- Definition Classes
- LazyTProtocol
- abstract def offset: Int
Return the offset currently on the underlying array byte of the transport used in reading.
Return the offset currently on the underlying array byte of the transport used in reading.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipBinary(): Int
Skips the length of a string on the underlying transport Returns: The offset at which the string can be read.
Skips the length of a string on the underlying transport Returns: The offset at which the string can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipBool(): Int
Skips the length of a boolean on the underlying transport Returns: The offset at which the boolean can be read.
Skips the length of a boolean on the underlying transport Returns: The offset at which the boolean can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipByte(): Int
Skips the length of a byte on the underlying transport Returns: The offset at which the byte can be read.
Skips the length of a byte on the underlying transport Returns: The offset at which the byte can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipDouble(): Int
Skips the length of a double on the underlying transport Returns: The offset at which the double can be read.
Skips the length of a double on the underlying transport Returns: The offset at which the double can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipEnum(): Int
Skip an Enum.
Skip an Enum. This still involves parsing but no objects are created.
- abstract def offsetSkipI16(): Int
Skips the length of a short on the underlying transport Returns: The offset at which the short can be read.
Skips the length of a short on the underlying transport Returns: The offset at which the short can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipI32(): Int
Skips the length of a int on the underlying transport Returns: The offset at which the int can be read.
Skips the length of a int on the underlying transport Returns: The offset at which the int can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipI64(): Int
Skips the length of a long on the underlying transport Returns: The offset at which the long can be read.
Skips the length of a long on the underlying transport Returns: The offset at which the long can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipList(): Int
Skip a list.
Skip a list. This still involves parsing but no objects are created.
- returns
The offset at which the list can be read.
- abstract def offsetSkipMap(): Int
Skip a map.
Skip a map. This still involves parsing but no objects are created.
- returns
The offset at which the map can be read.
- abstract def offsetSkipSet(): Int
Skip a set.
Skip a set. This still involves parsing but no objects are created.
- returns
The offset at which the set can be read.
- abstract def offsetSkipString(): Int
Skips the length of a string on the underlying transport Returns: The offset at which the string can be read.
Skips the length of a string on the underlying transport Returns: The offset at which the string can be read.
- Definition Classes
- LazyTProtocol
- abstract def offsetSkipStruct(): Int
Skip a struct.
Skip a struct. This still involves parsing but no objects are created.
- returns
The offset at which the struct can be read.
- abstract def readBinary(): ByteBuffer
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readBool(): Boolean
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readByte(): Byte
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readDouble(): Double
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readFieldBegin(): TField
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readFieldEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readI16(): Short
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readI32(): Int
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readI64(): Long
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readListBegin(): TList
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readListEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readMapBegin(): TMap
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readMapEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readMessageBegin(): TMessage
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readMessageEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readSetBegin(): TSet
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readSetEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readString(): String
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readStructBegin(): TStruct
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def readStructEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def withBytes(bytes: Array[Byte]): AdaptTProtocol
Create a new protocol object set up to read from given bytes.
- abstract def writeBinary(arg0: ByteBuffer): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeBool(arg0: Boolean): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeByte(arg0: Byte): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeDouble(arg0: Double): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeFieldBegin(arg0: TField): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeFieldEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeFieldStop(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeI16(arg0: Short): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeI32(arg0: Int): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeI64(arg0: Long): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeListBegin(arg0: TList): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeListEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeMapBegin(arg0: TMap): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeMapEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeMessageBegin(arg0: TMessage): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeMessageEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeRaw(buf: Array[Byte], offset: Int, len: Int): Unit
Take a segment of an Array[Byte] and presume it is already encoded for this transport and just copy it down.
Take a segment of an Array[Byte] and presume it is already encoded for this transport and just copy it down.
This is useful if we have a cached set of bytes used when deserializing a field or struct
- Definition Classes
- LazyTProtocol
- abstract def writeSetBegin(arg0: TSet): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeSetEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeString(arg0: String): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeStructBegin(arg0: TStruct): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
- abstract def writeStructEnd(): Unit
- Definition Classes
- TProtocol
- Annotations
- @throws(classOf[org.apache.thrift.TException])
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getScheme(): Class[_ <: IScheme]
- Definition Classes
- TProtocol
- def getTransport(): TTransport
- Definition Classes
- TProtocol
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def reset(): Unit
- Definition Classes
- TProtocol
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()