BaggageContext
based on atoms and
lexicographic merge.See: Description
Class | Description |
---|---|
AtomLayerOverflow |
Contains static methods for trimming baggage atoms to size extents.
|
AtomLayerSerialization |
The underlying serialization format of atoms is to simply length-prefix the bytes of each atom.
|
ByteBuffers |
Some functions I found useful for working with byte buffers
|
Lexicographic |
This class has static methods for lexicographically comparing bytes.
|
MergeIterator<T> |
Merges multiple iterators and produces elements according to the provided comparator.
|
MergeTwoIterator<T> |
Like
MergeIterator but for two iterators only |
ProtobufVarint |
Duplicates logic of Protocol Buffers variable length integer encoding, but with different logic for exceptions.
|
SignedLexVarint |
Signed varint (32 bit and 64 bit) that is encoded in such a way that the lexicographic comparison of the binary
encoding is consistent with the numeric comparison of the numeric values.
|
StringUtils |
Want to avoid having apache commons as a dependency, so implement any functions used here
|
TypeUtils |
Some useful utility methods related to bits and bytes
|
UnsignedByteBuffer |
Adapted from Guava's com.google.common.primitives.UnsignedBytes to provide comparators for unsigned ByteBuffers
|
UnsignedLexVarint |
Unsigned varint (32 bit and 64 bit) that is encoded in such a way that the lexicographic comparison of the binary
encoding is consistent with the numeric comparison of the numeric values.
|
Exception | Description |
---|---|
AtomLayerException | |
ProtobufVarint.EndOfStreamException | |
ProtobufVarint.MalformedVarintException |
Provides the Tracing Plane's core underlying data representation for BaggageContext
based on atoms and
lexicographic merge.
The key primitives provided by the Atom Layer are an intermediary data format for BaggageContext
s based on
atoms, along with the default atom-based comparison and merge functions based on the lexicographic ordering of
atoms.
The Atom Layer represents atoms using ByteBuffer
s.
This package also contains functions for encoding lexicographically consistent variable length integers.
The Atom Layer provides an underlying representation for BaggageContext
based on atoms. Other layers
of the tracing plane use atoms to construct data structures like sets and maps. Since the Atom Layer is an inner
layer of the Tracing Plane, it is not expected for users to have to deal with this layer directly.
However, the Atom Layer does provide a minimal BaggageContext
implementation that you can use to
propagate contexts. This implementation lets you propagate contexts, but you cannot update them or access their
content.
The atom layer is based on the notion of atoms: an atom is an arbitrary array of zero or more bytes; and a
BaggageContext
is an arbitrary array of atoms, by default empty. The interpretation of atoms is up to the
clients calling down to the atom layer, and an atom is indivisible by the atom layer. The ordering of atoms is also
up to clients; however, the atom layer's BaggageProvider#join(BaggageContext, BaggageContext)
implementation
can affect the position of atoms.