org.modeshape.jcr.query

## Class BufferManager.DelegatingKeySerializer<K extends Comparable<K>>

- java.lang.Object
- - org.mapdb.BTreeKeySerializer<K>
  - - org.modeshape.jcr.query.BufferManager.DelegatingKeySerializer<K>

- Type Parameters:
    `K` - the type to be serialized
  All Implemented Interfaces:
    Serializable, BufferManager.KeySerializerWithComparator<K>
  Enclosing class:
    BufferManager

      public static final class BufferManager.DelegatingKeySerializer<K extends Comparable<K>>
      extends org.mapdb.BTreeKeySerializer<K>
      implements Serializable, BufferManager.KeySerializerWithComparator<K>

  A key serializer that just writes data without applying any compression.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.mapdb.BTreeKeySerializer

      `org.mapdb.BTreeKeySerializer.BasicKeySerializer, org.mapdb.BTreeKeySerializer.Tuple2KeySerializer<A,B>, org.mapdb.BTreeKeySerializer.Tuple3KeySerializer<A,B,C>, org.mapdb.BTreeKeySerializer.Tuple4KeySerializer<A,B,C,D>, org.mapdb.BTreeKeySerializer.Tuple5KeySerializer<A,B,C,D,E>, org.mapdb.BTreeKeySerializer.Tuple6KeySerializer<A,B,C,D,E,F>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Comparator<K>` | `comparator`
    `protected org.mapdb.Serializer<K>` | `defaultSerializer`

    - ### Fields inherited from class org.mapdb.BTreeKeySerializer

      `BASIC, STRING, TUPLE2, TUPLE3, TUPLE4, ZERO_OR_POSITIVE_INT, ZERO_OR_POSITIVE_LONG`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BufferManager.DelegatingKeySerializer(org.mapdb.Serializer<K> defaultSerializer)`
    `protected` | `BufferManager.DelegatingKeySerializer(org.mapdb.Serializer<K> defaultSerializer, Comparator<K> comparator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object[]` | `deserialize(DataInput in, int start, int end, int size)`
    `Comparator<K>` | `getComparator()`
    `void` | `serialize(DataOutput out, int start, int end, Object[] keys)`
    `String` | `toString()`
    `org.mapdb.BTreeKeySerializer<K>` | `withComparator(Comparator<?> comparator)`

    - ### Methods inherited from class org.mapdb.BTreeKeySerializer

      `leadingValuePackRead, leadingValuePackWrite`

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

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

- - ### Field Detail

    - #### defaultSerializer

          protected final transient org.mapdb.Serializer<K extends Comparable<K>> defaultSerializer

    - #### comparator

          protected final transient Comparator<K extends Comparable<K>> comparator

  - ### Constructor Detail

    - #### BufferManager.DelegatingKeySerializer

          protected BufferManager.DelegatingKeySerializer(org.mapdb.Serializer<K> defaultSerializer)

    - #### BufferManager.DelegatingKeySerializer

          protected BufferManager.DelegatingKeySerializer(org.mapdb.Serializer<K> defaultSerializer,
                                               Comparator<K> comparator)

  - ### Method Detail

    - #### getComparator

          public Comparator<K> getComparator()

      Specified by:
        `getComparator` in class `org.mapdb.BTreeKeySerializer<K extends Comparable<K>>`

    - #### withComparator

          public org.mapdb.BTreeKeySerializer<K> withComparator(Comparator<?> comparator)

      Specified by:
        `withComparator` in interface `BufferManager.KeySerializerWithComparator<K extends Comparable<K>>`

    - #### serialize

          public void serialize(DataOutput out,
                       int start,
                       int end,
                       Object[] keys)
                         throws IOException

      Specified by:
        `serialize` in class `org.mapdb.BTreeKeySerializer<K extends Comparable<K>>`
      Throws:
        `IOException`

    - #### deserialize

          public Object[] deserialize(DataInput in,
                             int start,
                             int end,
                             int size)
                               throws IOException

      Specified by:
        `deserialize` in class `org.mapdb.BTreeKeySerializer<K extends Comparable<K>>`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.