org.exist.util
Class CharArrayPool
java.lang.Object
org.exist.util.CharArrayPool
- public class CharArrayPool
- extends java.lang.Object
A pool for char arrays.
This pool is used by class XMLString. Whenever an XMLString needs to
reallocate the backing char[], the old array is released into the pool. However,
only char[] with length < MAX are kept in the pool. Larger char[] are rarely reused.
The pool is bound to the current thread.
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_
CharArrayPool
public CharArrayPool()
getCharArray
public static char[] getCharArray(int size)
releaseCharArray
public static void releaseCharArray(char[] b)
Copyright (C) Wolfgang Meier. All rights reserved.