An extension to the TProtocol to enable lazy reading
This class encapsulates a TField reference with a TCompactProtocol-encoded binary blob.
A version of TMemoryTransport that allows for reuse in order to minimize object allocations.
Metadata for a thrift method.
A marker trait for interfaces that represent thrift services.
A trait encapsulating the logic for encoding and decoding a specific thrift struct type.
A trait encapsulating the logic for encoding and decoding a specific thrift struct type. The methods encoder and decoder are used by scrooge2 generated code, but are now deprecated. scrooge3 generated code uses encode and decode.
structs generated by scrooge3 will extends this base class, which provides implementations for the deprecated encoder/decoder methods that depend on encode and decode, which are generated.
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
A trait indicating that this can be converted to a ThriftService
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.
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.