org.exist.util
Class CharArrayPool
java.lang.Object
org.exist.util.CharArrayPool
public class CharArrayPool
- extends 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.
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 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.