public class AtomContext extends java.lang.Object implements BaggageContext
A minimal implementation of BaggageContext based on atoms and lexicographic merge, but providing no read or
write methods to the atoms themselves.
| Modifier and Type | Method and Description |
|---|---|
AtomContext |
branch() |
java.util.List<java.nio.ByteBuffer> |
getModifiableAtoms()
Returns the
List that backs this AtomContext object, so modifications to the list will be
reflected by this context and vice versa. |
java.util.List<java.nio.ByteBuffer> |
getUnmodifiableAtoms()
Returns the
List that backs this AtomContext object. |
AtomContext |
merge(AtomContext other) |
int |
serializedSize() |
public AtomContext branch()
public AtomContext merge(AtomContext other)
public int serializedSize()
public java.util.List<java.nio.ByteBuffer> getUnmodifiableAtoms()
Returns the List that backs this AtomContext object. This method is only for observing the atoms,
not for updating them.
AtomContextpublic java.util.List<java.nio.ByteBuffer> getModifiableAtoms()
Returns the List that backs this AtomContext object, so modifications to the list will be
reflected by this context and vice versa. AtomContext uses reference counting as an optimization, so a
call to this method might result in duplicating atoms if others currently hold a reference to them.
AtomContext