org.modeshape.jcr.query

## Interface BufferManager.DistinctBufferMaker<T>

- Type Parameters:
    `T` - the type of value to be used in the buffer
  All Known Implementing Classes:
    BufferManager.MakeDistinctBuffer
  Enclosing class:
    BufferManager

      public static interface BufferManager.DistinctBufferMaker<T>

  An object use to create a new `BufferManager.DistinctBuffer`.
  See Also:
    `BufferManager.createDistinctBuffer(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.

- - ### Method Detail

    - #### useHeap

          BufferManager.DistinctBufferMaker<T> useHeap(boolean useHeap)

      Specify whether to store the bufer on the heap.
      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

    - #### keepSize

          BufferManager.DistinctBufferMaker<T> keepSize(boolean keepBufferSize)

      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.
      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

    - #### make

          BufferManager.DistinctBuffer<T> make()

      Create the `BufferManager.DistinctBuffer` instance.
      Returns:
        the distinct buffer; never null

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