org.infinispan.schematic.internal.io

## Class BufferCache

- java.lang.Object
- - org.infinispan.schematic.internal.io.BufferCache

-     @NotThreadSafe
      public class BufferCache
      extends Object

  A cache of ByteBuffer, used in `BsonDataInput`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MAXIMUM_SIZE` The maximum number of bytes in each cached buffer.
    `static int` | `MINIMUM_SIZE` The minimum number of bytes in each buffer.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BufferCache()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkin(ByteBuffer byteBuffer)`
    `void` | `checkin(CharBuffer charBuffer)`
    `ByteBuffer` | `getByteBuffer(int minimumSize)`
    `CharBuffer` | `getCharBuffer(int minimumSize)`

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

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

- - ### Field Detail

    - #### MINIMUM_SIZE

          public static final int MINIMUM_SIZE

      The minimum number of bytes in each buffer.
      See Also:
        Constant Field Values

    - #### MAXIMUM_SIZE

          public static final int MAXIMUM_SIZE

      The maximum number of bytes in each cached buffer. If a buffer is too large, then using it and caching it in-memory will be too costly.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BufferCache

          public BufferCache()

  - ### Method Detail

    - #### getByteBuffer

          public ByteBuffer getByteBuffer(int minimumSize)

    - #### getCharBuffer

          public CharBuffer getCharBuffer(int minimumSize)

    - #### checkin

          public void checkin(ByteBuffer byteBuffer)

    - #### checkin

          public void checkin(CharBuffer charBuffer)

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