public class UnfilteredSerializer
extends java.lang.Object
Serialize/deserialize a single Unfiltered (both on-wire and on-disk).
The encoded format for an unfiltered is (|) where:
is a byte (or two) whose bits are flags used by the rest of the serialization. Each
flag is defined/explained below as the "Unfiltered flags" constants. One of those flags
is an extension flag, and if present, trigger the rid of another byte that contains more
flags. If the extension is not set, defaults are assumed for the flags of that 2nd byte.
is [][][]...... where
is the row clustering as serialized by
Clustering.serializer
. Note that static row are an exception and
don't have this. , and are the row timestamp, ttl and deletion
whose presence is determined by the flags. is the simple columns of the row and the
complex ones.
The columns for the row are then serialized if they differ from those in the header,
and each cell then follows:
* Each simple column will simply be a
(which might have no value, see below),
* Each will be []... where
is the deletion for this complex column (if flags indicates it present),
is the vint encoded value of n, i.e. 's 1-based index,
are the for this complex column
is where is the marker bound as serialized
by Slice.Bound.serializer and is the marker deletion
time.
A cell start with a 1 byte . The 2nd and third flag bits indicate if
it's a deleted or expiring cell. The 4th flag indicates if the value
is empty or not. The 5th and 6th indicates if the timestamp and ttl/
localDeletionTime for the cell are the same than the row one (if that
is the case, those are not repeated for the cell).Follows the
(unless it's marked empty in the flag) and a delta-encoded long
(unless the flag tells to use the row level one).
Then if it's a deleted or expiring cell a delta-encoded int
and if it's expiring a delta-encoded int (unless it's an expiring cell
and the ttl and localDeletionTime are indicated by the flags to be the same
than the row ones, in which case none of those appears). | | |