Base class for unknown enum items.
Base class for unknown enum items. The implementations are used for backward compatibility during enum update at producer.
Immutable Map of Header Keys Strings to Seq of Header Buf
Values.
An extension to the TProtocol to enable lazy reading
An extension to the TProtocol to enable lazy reading
Three main classes of operations are intended to be enabled here:
1) Enable caching of a backing Array[Byte] so we can serialize quickly what we just deserialized if unchanged. 2) Enabling deferred string decoding, since string decoding is an expensive operation if we don't need the string large savings can be had avoiding this for all strings in our deserialization path. 3) Optional fields require boxing + allocations during deserialization for primitive types, this stores the offset to those types instead, doing a lazy instantiation of the Option when the field is first accessed.
A ProtocolExceptionResponse represents a response which throws a thrift application exception of protocol error.
A ProtocolExceptionResponse represents a response which throws a thrift application exception of protocol error.
a TApplicationException of protocol error
while this is a public API, it is only intended for use by the generated code.
A RichResponse tells filters richer information of a response, including the corresponding request, intermediate forms of the response and final response in byte buffer.
A RichResponse tells filters richer information of a response, including the corresponding request, intermediate forms of the response and final response in byte buffer.
type of the request
intermediate form of the response
A SuccessfulResponse represents a successful response.
A SuccessfulResponse represents a successful response.
a result contains deserialized successful response
while this is a public API, it is only intended for use by the generated code.
This class encapsulates a TField reference with a TCompactProtocol-encoded binary blob.
This is a per-thread managed resource and must be reset after use
This is a per-thread managed resource and must be reset after use
import com.twitter.scrooge.TReusableBuffer class Example { private[this] val reusableBuffer = new TReusableBuffer() def someMethod(): Unit = { val buffer = reusableBuffer.get() try { // code that uses buffer } finally { buffer.reset() } } }
The initial buffer size, default is 512.
The buffer will reset if it exceeds max buffer size, default is 16K.
A version of TMemoryTransport that allows for reuse in order to minimize object allocations.
A ThriftExceptionResponse represents a response which throws thrift application exceptions defined in IDL.
A ThriftExceptionResponse represents a response which throws thrift application exceptions defined in IDL.
the thrift application exception
while this is a public API, it is only intended for use by the generated code.
Metadata for a method for a Thrift service.
Metadata for a method for a Thrift service.
Comments below will use this example IDL:
service ExampleService { i32 boringMethod( 1: i32 input1, 2: string input2 ) }
A trait encapsulating the logic for encoding and decoding a specific thrift struct type.
Introduced as a backwards compatible API bridge in Scrooge 3.
Introduced as a backwards compatible API bridge in Scrooge 3. Scala generated structs extend from this class.
Field information to be embedded in a generated struct's companion class.
Field information to be embedded in a generated struct's companion class. Allows for reflection on field types.
A simple class for generic introspection on ThriftStruct classes.
Unions are tagged with this trait as well as with ThriftStruct.
Field information to be embedded in a generated union's companion class.
Field information to be embedded in a generated union's companion class.
The type of the union field represented by this class
The type of the value contained in the union field represented by this class
This trait extends from HasThriftStructCodec3 and ThriftStruct.
This trait extends from HasThriftStructCodec3 and ThriftStruct. It should be safe to call "validatingStruct._codec.validateNewInstance(validatingStruct)" on any validatingStruct that implements ValidatingThriftStruct. We take advantage of this fact in the validateField method in ValidatingThriftStructCodec3.
A method could be added to this trait that does this (with more type safety), but we want to avoid adding unnecessary methods to thrift structs.
A string representing reserved method name asClosable
TArrayByteTransport decodes Array[Byte] to primitive types This is a replacement transport optimized for Array[Byte] and the TLazyBinaryProtocol
TArrayByteTransport decodes Array[Byte] to primitive types This is a replacement transport optimized for Array[Byte] and the TLazyBinaryProtocol
NB. This class/transport is not thread safe, and contains mutable state.
This is an implementation of the LazyTProtocol trait in scrooge-core This is not thread safe and maintains state.
This is an implementation of the LazyTProtocol trait in scrooge-core This is not thread safe and maintains state. It also heavily uses inline annotations and marks things as final where possible to avoid virtual indirects. Its in a benchmark package as a POC, we may want to do something a bit different when it comes to a version for scrooge-serializer or elsewhere. Though it is a fully functional protocol that will deserialize/serialize any thrift.