ClusteringPrefix.Deserializer (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db

## Class ClusteringPrefix.Deserializer

- java.lang.Object
- - org.apache.cassandra.db.ClusteringPrefix.Deserializer

- Enclosing interface:
    ClusteringPrefix

      public static class ClusteringPrefix.Deserializer
      extends java.lang.Object

  Helper class that makes the deserialization of clustering prefixes faster.

  The main reason for this is that when we deserialize rows from sstables, there is many cases where we have a bunch of rows to skip at the beginning of an index block because those rows are before the requested slice. This class make sure we can answer the question "is the next row on disk before the requested slice" with as little work as possible. It does that by providing a comparison method that deserialize only what is needed to decide of the comparison.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Deserializer(ClusteringComparator comparator, DataInputPlus in, SerializationHeader header)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareNextTo(ClusteringBoundOrBoundary bound)`
    `ClusteringBoundOrBoundary` | `deserializeNextBound()`
    `Clustering` | `deserializeNextClustering()`
    `void` | `prepare(int flags, int extendedFlags)`
    `ClusteringPrefix.Kind` | `skipNext()`

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

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

- - ### Constructor Detail

    - #### Deserializer

          public Deserializer(ClusteringComparator comparator,
                              DataInputPlus in,
                              SerializationHeader header)

  - ### Method Detail

    - #### prepare

          public void prepare(int flags,
                              int extendedFlags)
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### compareNextTo

          public int compareNextTo(ClusteringBoundOrBoundary bound)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeNextBound

          public ClusteringBoundOrBoundary deserializeNextBound()
                                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeNextClustering

          public Clustering deserializeNextClustering()
                                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### skipNext

          public ClusteringPrefix.Kind skipNext()
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2018 The Apache Software Foundation