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 |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
BufferCache
public BufferCache()
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-2012 JBoss, a division of Red Hat. All Rights Reserved.