org.modeshape.jcr.query

## Interface BufferManager.Buffer

- All Superinterfaces:
    AutoCloseable
  All Known Subinterfaces:
    BufferManager.DistinctBuffer<T>, BufferManager.QueueBuffer<T>, BufferManager.SortingBuffer<SortType,RecordType>
  All Known Implementing Classes:
    BufferManager.CloseableBuffer, BufferManager.CloseableDistinctBuffer, BufferManager.CloseableQueueBuffer, BufferManager.CloseableSortingBuffer, BufferManager.CloseableSortingBufferWithDuplicates
  Enclosing class:
    BufferManager

      public static interface BufferManager.Buffer
      extends AutoCloseable

  A basic buffer interface.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the buffer and release all resources.
    `boolean` | `isEmpty()` Determine if this buffer is empty.
    `long` | `size()` Get the size of the buffer.

- - ### Method Detail

    - #### isEmpty

          boolean isEmpty()

      Determine if this buffer is empty. This may be more efficient than `size()`.
      Returns:
        true if the buffer is empty, or false otherwise

    - #### size

          long size()

      Get the size of the buffer. This might be more expensive if the buffer is not created with the flag to keep the size.
      Returns:
        the size of the buffer.

    - #### close

          void close()

      Close the buffer and release all resources. The buffer is not usable after this.
      Specified by:
        `close` in interface `AutoCloseable`

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