org.apache.cassandra.db.marshal

## Class LocalByPartionerType

- java.lang.Object
- - org.apache.cassandra.db.marshal.AbstractType<java.nio.ByteBuffer>
  - - org.apache.cassandra.db.marshal.LocalByPartionerType

- All Implemented Interfaces:
    java.util.Comparator<java.nio.ByteBuffer>

      public class LocalByPartionerType
      extends AbstractType<java.nio.ByteBuffer>

  for sorting columns representing row keys in the row ordering as determined by a partitioner. Not intended for user-defined CFs, and will in fact error out if used with such.

- - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.db.marshal.AbstractType

      `reverseComparator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalByPartionerType(IPartitioner partitioner)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(java.nio.ByteBuffer o1, java.nio.ByteBuffer o2)`
    `java.nio.ByteBuffer` | `compose(java.nio.ByteBuffer bytes)`
    `java.nio.ByteBuffer` | `decompose(java.nio.ByteBuffer bytes)`
    `Term` | `fromJSONObject(java.lang.Object parsed)` Given a parsed JSON string, return a byte representation of the object.
    `java.nio.ByteBuffer` | `fromString(java.lang.String source)` get a byte representation of the given string.
    `TypeSerializer<java.nio.ByteBuffer>` | `getSerializer()`
    `java.lang.String` | `getString(java.nio.ByteBuffer bytes)` get a string representation of the bytes suitable for log messages
    `java.lang.String` | `toJSONString(java.nio.ByteBuffer buffer, int protocolVersion)` Converts the specified value into its JSON representation.
    `void` | `validate(java.nio.ByteBuffer bytes)`

    - ### Methods inherited from class org.apache.cassandra.db.marshal.AbstractType

      `asCQL3Type, asCQLTypeStringList, compareCollectionMembers, componentsCount, freeze, getComponents, getString, isByteOrderComparable, isCollection, isCompatibleWith, isCounter, isEmptyValueMeaningless, isFrozenCollection, isMultiCell, isReversed, isValueCompatibleWith, isValueCompatibleWithInternal, parseDefaultParameters, references, toString, toString, validateCellValue, validateCollectionMember`

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

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

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### LocalByPartionerType

          public LocalByPartionerType(IPartitioner partitioner)

  - ### Method Detail

    - #### compose

          public java.nio.ByteBuffer compose(java.nio.ByteBuffer bytes)

      Overrides:
        `compose` in class `AbstractType<java.nio.ByteBuffer>`

    - #### decompose

          public java.nio.ByteBuffer decompose(java.nio.ByteBuffer bytes)

      Overrides:
        `decompose` in class `AbstractType<java.nio.ByteBuffer>`

    - #### getString

          public java.lang.String getString(java.nio.ByteBuffer bytes)

      Description copied from class: `AbstractType`
      get a string representation of the bytes suitable for log messages
      Overrides:
        `getString` in class `AbstractType<java.nio.ByteBuffer>`

    - #### fromString

          public java.nio.ByteBuffer fromString(java.lang.String source)

      Description copied from class: `AbstractType`
      get a byte representation of the given string.
      Specified by:
        `fromString` in class `AbstractType<java.nio.ByteBuffer>`

    - #### fromJSONObject

          public Term fromJSONObject(java.lang.Object parsed)

      Description copied from class: `AbstractType`
      Given a parsed JSON string, return a byte representation of the object.
      Specified by:
        `fromJSONObject` in class `AbstractType<java.nio.ByteBuffer>`
      Parameters:
        `parsed` - the result of parsing a json string

    - #### toJSONString

          public java.lang.String toJSONString(java.nio.ByteBuffer buffer,
                                               int protocolVersion)

      Description copied from class: `AbstractType`
      Converts the specified value into its JSON representation.

      The buffer position will stay the same.

      Overrides:
        `toJSONString` in class `AbstractType<java.nio.ByteBuffer>`
      Parameters:
        `buffer` - the value to convert
        `protocolVersion` - the protocol version to use for the conversion
      Returns:
        a JSON string representing the specified value

    - #### compare

          public int compare(java.nio.ByteBuffer o1,
                             java.nio.ByteBuffer o2)

    - #### validate

          public void validate(java.nio.ByteBuffer bytes)
                        throws MarshalException

      Overrides:
        `validate` in class `AbstractType<java.nio.ByteBuffer>`
      Throws:
        `MarshalException`

    - #### getSerializer

          public TypeSerializer<java.nio.ByteBuffer> getSerializer()

      Specified by:
        `getSerializer` in class `AbstractType<java.nio.ByteBuffer>`

Copyright © 2018 The Apache Software Foundation