org.apache.cassandra.db.rows

## Class UnfilteredRowIteratorSerializer

- java.lang.Object
- - org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer

    public class UnfilteredRowIteratorSerializer
    extends java.lang.Object

Serialize/Deserialize an unfiltered row iterator. The serialization is composed of a header, follows by the rows and range tombstones of the iterator serialized until we read the end of the partition (see UnfilteredSerializer for details). The header itself is: `<cfid><key><flags><s_header>[<partition_deletion>][<static_row>][<row_estimate>] where: <cfid> is the table cfid. <key> is the partition key. <flags> contains bit flags. Each flag is set if it's corresponding bit is set. From rightmost bit to leftmost one, the flags are: - is empty: whether the iterator is empty. If so, nothing follows the <flags> - is reversed: whether the iterator is in reversed clustering order - has partition deletion: whether or not there is a <partition_deletion> following - has static row: whether or not there is a <static_row> following - has row estimate: whether or not there is a <row_estimate> following <s_header> is the {@code SerializationHeader}. It contains in particular the columns contains in the serialized iterator as well as other information necessary to decoding the serialized rows (see {@code SerializationHeader.Serializer for details}). <partition_deletion> is the deletion time for the partition (delta-encoded) <static_row> is the static row for this partition as serialized by UnfilteredSerializer. <row_estimate> is the (potentially estimated) number of rows serialized. This is only used for the purpose of sizing on the receiving end and should not be relied upon too strongly.` Please note that the format described above is the on-wire format. On-disk, the format is basically the same, but the header is written once per sstable, not once per-partition. Further, the actual row and range tombstones are not written using this class, but rather by `ColumnIndex`.

### Nested Class Summary

Nested Classes
`static class` `UnfilteredRowIteratorSerializer.Header`

### Field Summary

Fields
`protected static org.slf4j.Logger` `logger`
`static UnfilteredRowIteratorSerializer` `serializer`

### Constructor Summary

Constructors
Constructor and Description
`UnfilteredRowIteratorSerializer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`UnfilteredRowIterator` `deserialize(DataInputPlus in, int version, CFMetaData metadata, ColumnFilter selection, SerializationHelper.Flag flag)`
`UnfilteredRowIterator` `deserialize(DataInputPlus in, int version, CFMetaData metadata, SerializationHelper.Flag flag, UnfilteredRowIteratorSerializer.Header header)`
`UnfilteredRowIteratorSerializer.Header` `deserializeHeader(CFMetaData metadata, ColumnFilter selection, DataInputPlus in, int version, SerializationHelper.Flag flag)`
`void` `serialize(UnfilteredRowIterator iterator, ColumnFilter selection, DataOutputPlus out, int version)`
`void` `serialize(UnfilteredRowIterator iterator, ColumnFilter selection, DataOutputPlus out, int version, int rowEstimate)`
`void` `serialize(UnfilteredRowIterator iterator, SerializationHeader header, ColumnFilter selection, DataOutputPlus out, int version, int rowEstimate)`
`long` `serializedSize(UnfilteredRowIterator iterator, ColumnFilter selection, int version, int rowEstimate)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### logger

    protected static final org.slf4j.Logger logger

#### serializer

    public static final UnfilteredRowIteratorSerializer serializer

### Constructor Detail

#### UnfilteredRowIteratorSerializer

    public UnfilteredRowIteratorSerializer()

### Method Detail

#### serialize

    public void serialize(UnfilteredRowIterator iterator,
                          ColumnFilter selection,
                          DataOutputPlus out,
                          int version)
                   throws java.io.IOException

Throws:
  `java.io.IOException`

#### serialize

    public void serialize(UnfilteredRowIterator iterator,
                          ColumnFilter selection,
                          DataOutputPlus out,
                          int version,
                          int rowEstimate)
                   throws java.io.IOException

Throws:
  `java.io.IOException`

#### serialize

    public void serialize(UnfilteredRowIterator iterator,
                          SerializationHeader header,
                          ColumnFilter selection,
                          DataOutputPlus out,
                          int version,
                          int rowEstimate)
                   throws java.io.IOException

Throws:
  `java.io.IOException`

#### serializedSize

    public long serializedSize(UnfilteredRowIterator iterator,
                               ColumnFilter selection,
                               int version,
                               int rowEstimate)

#### deserializeHeader

    public UnfilteredRowIteratorSerializer.Header deserializeHeader(CFMetaData metadata,
                                                                    ColumnFilter selection,
                                                                    DataInputPlus in,
                                                                    int version,
                                                                    SerializationHelper.Flag flag)
                                                             throws java.io.IOException

Throws:
  `java.io.IOException`

#### deserialize

    public UnfilteredRowIterator deserialize(DataInputPlus in,
                                             int version,
                                             CFMetaData metadata,
                                             SerializationHelper.Flag flag,
                                             UnfilteredRowIteratorSerializer.Header header)
                                      throws java.io.IOException

Throws:
  `java.io.IOException`

#### deserialize

    public UnfilteredRowIterator deserialize(DataInputPlus in,
                                             int version,
                                             CFMetaData metadata,
                                             ColumnFilter selection,
                                             SerializationHelper.Flag flag)
                                      throws java.io.IOException

Throws:
  `java.io.IOException`