org.modeshape.jcr.query

## Class BufferManager.MakeDistinctBuffer<T>

- java.lang.Object
- - org.modeshape.jcr.query.BufferManager.MakeDistinctBuffer<T>

- All Implemented Interfaces:
    BufferManager.DistinctBufferMaker<T>
  Enclosing class:
    BufferManager

      protected final class BufferManager.MakeDistinctBuffer<T>
      extends Object
      implements BufferManager.DistinctBufferMaker<T>

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BufferManager.MakeDistinctBuffer(String name, org.mapdb.Serializer<T> serializer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BufferManager.DistinctBufferMaker<T>` | `keepSize(boolean keepBufferSize)` Specify whether to keep track of the buffer size when adding value.
    `BufferManager.DistinctBuffer<T>` | `make()` Create the `BufferManager.DistinctBuffer` instance.
    `BufferManager.DistinctBufferMaker<T>` | `useHeap(boolean useHeap)` Specify whether to store the bufer on the heap.

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

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

- - ### Constructor Detail

    - #### BufferManager.MakeDistinctBuffer

          protected BufferManager.MakeDistinctBuffer(String name,
                                          org.mapdb.Serializer<T> serializer)

  - ### Method Detail

    - #### keepSize

          public BufferManager.DistinctBufferMaker<T> keepSize(boolean keepBufferSize)

      Description copied from interface: `BufferManager.DistinctBufferMaker`
      Specify whether to keep track of the buffer size when adding value. Doing so may slow adds, but it will make returning the size very quick. Adds may be faster if this is set to false, but asking the buffer for its size requires iterating over the entire buffer and thus may be slower.
      Specified by:
        `keepSize` in interface `BufferManager.DistinctBufferMaker<T>`
      Parameters:
        `keepBufferSize` - true if the buffer is to efficiently track its size, or false if it can skip this and, only if `BufferManager.Buffer.size()` is called, compute the size in a brute force manner.
      Returns:
        this maker instance; never null

    - #### useHeap

          public BufferManager.DistinctBufferMaker<T> useHeap(boolean useHeap)

      Description copied from interface: `BufferManager.DistinctBufferMaker`
      Specify whether to store the bufer on the heap.
      Specified by:
        `useHeap` in interface `BufferManager.DistinctBufferMaker<T>`
      Parameters:
        `useHeap` - true if the buffer's contents are to be stored on the heap, or false if off-heap storage should be used.
      Returns:
        this maker instance; never null

    - #### make

          public BufferManager.DistinctBuffer<T> make()

      Description copied from interface: `BufferManager.DistinctBufferMaker`
      Create the `BufferManager.DistinctBuffer` instance.
      Specified by:
        `make` in interface `BufferManager.DistinctBufferMaker<T>`
      Returns:
        the distinct buffer; never null

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