org.exist.util
Class ByteArrayPool
java.lang.Object
org.exist.util.ByteArrayPool
- public class ByteArrayPool
- extends java.lang.Object
A pool for byte arrays.
This pool is primarily used while parsing documents: serializing the
DOM nodes generates a lot of small byte chunks. Only byte arrays
with length < MAX are kept in the pool. Large arrays are rarely
reused.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POOL_SIZE
public static final int POOL_SIZE
- See Also:
- Constant Field Values
MAX
public static final int MAX
- See Also:
- Constant Field Values
pools_
public static final java.lang.ThreadLocal pools_
ByteArrayPool
public ByteArrayPool()
getByteArray
public static byte[] getByteArray(int size)
releaseByteArray
public static void releaseByteArray(byte[] b)
Copyright (C) Wolfgang Meier. All rights reserved.