Package org.glassfish.json.api
Interface BufferPool
- All Known Implementing Classes:
BufferPoolImpl
public interface BufferPool
char[] pool that pool instances of char[] which are expensive to create.
-
Method Summary
-
Method Details
-
take
char[] take()Gets a new char[] object from the pool.If no object is available in the pool, this method creates a new one.
- Returns:
- always non-null.
-
recycle
void recycle(char[] buf) Returns an object back to the pool.- Parameters:
buf
- object to return back to the pool
-