See: Description
Interface | Description |
---|---|
ElementReader |
Iterator-like interface for reading data atoms
|
ElementWriter |
Iterator-like interface for writing atoms.
|
Class | Description |
---|---|
AtomPrefixes |
This class has the logic for creating and checking bag prefixes.
|
AtomPrefixes.AtomPrefix |
The first byte of an atom is its prefix, which contains some metadata about the atom; the first bit of an atom
denotes whether it is a data atom or header atom.
|
AtomPrefixes.DataPrefix | |
AtomPrefixes.HeaderPrefix |
The first byte of a header atom also specifies whether it is indexed or keyed, and the header's level
|
AtomPrefixes.IndexedHeaderPrefix |
The payload of an indexed header is expected to be an unsigned variable-length lexicographically consistent
integer:
UnsignedLexVarint |
AtomPrefixes.KeyedHeaderPrefix |
The payload of a keyed header is expected to be arbitrary length bytes.
|
AtomPrefixes.UnsupportedPrefix | |
AtomPrefixTypes |
This class has the bitwise logic for different bags prefixes.
|
AtomPrefixTypes.BagOptionsInPrefix |
Some bag options are contained within the header prefix -- currently only the
BagOptions.MergeBehavior |
AtomPrefixTypes.Level |
Levels are used by headers.
|
BaggageProtocol | |
BaggageReader |
Iterates over a list of atoms, interpreting them according to the baggage protocol; readers interpret data atoms and construct corresponding object representations.
|
BaggageWriter |
Used for writing out baggage atoms that adhere to the baggage protocol
TODO: comments and documentation
|
BagKey |
A
BagKey is used to look up data items and child bags within a baggage instance. |
BagKey.Indexed |
An Indexed BagKey is one that uses an integer as identifier (versus arbitrary bytes for a
BagKey.Keyed key) |
BagKey.Keyed |
A Keyed BagKey is one that uses arbitrary bytes as identifier (versus an integer for
BagKey.Indexed key) |
BagOptions |
The only additional option that we propagate is the merge behavior.
|
HeaderSerialization |
Contains methods to serialize and deserialize header atoms (eg,
AtomPrefixes.IndexedHeaderPrefix and
AtomPrefixes.KeyedHeaderPrefix atoms) |
Enum | Description |
---|---|
AtomPrefixTypes.AtomType |
The first bit of a prefix is the atom type:
0 is a data atom
1 is a header atom There is also an overflow marker BaggageAtoms#OVERFLOW_MARKER that is just the empty byte array (ie, it
has no prefix) and therefore lexicographically less than all other atoms |
AtomPrefixTypes.HeaderType |
There are two different types of header.
|
BagOptions.MergeBehavior |
Exception | Description |
---|---|
BaggageLayerException | |
BaggageLayerException.BaggageLayerRuntimeException |
Defines an encoding scheme for nested data structures using atoms.
The Baggage Protocol reads and writes BaggageContext
s with a pre-order depth-first traversal. Starting from
the root of the tree, we first have data for that node, followed by child nodes. Child nodes can be addressed by
either statically defined indices, or by arbitrary-length key.
The BaggageReader
and BaggageWriter
classes are used for reading and writing atoms for
BaggageContext
instances.
Details of the baggage protocol can be found on the project GitHub repository.