|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.pool.base.AbstractPool<char[]>
net.sf.mmm.util.pool.impl.CharArrayPoolImpl
public class CharArrayPoolImpl
This is the default implementation of the
Pool interface for char-arrays.
| Field Summary | |
|---|---|
private int |
arrayLength
The actual length of the char-arrays. |
static int |
DEFAULT_ARRAY_LENGTH
The default array length. |
| Fields inherited from class net.sf.mmm.util.pool.base.AbstractPool |
|---|
DEFAULT_CAPACITY |
| Constructor Summary | |
|---|---|
CharArrayPoolImpl()
The constructor. |
|
CharArrayPoolImpl(int capacity,
int arrayLength)
The constructor. |
|
| Method Summary | |
|---|---|
protected char[] |
create()
This method creates a new element. |
protected boolean |
reset(char[] element)
This method resets the given element so it can be reused. |
| Methods inherited from class net.sf.mmm.util.pool.base.AbstractPool |
|---|
borrow, clear, getCapacity, getSize, isEmpty, release |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.mmm.util.pool.api.Pool |
|---|
borrow, isEmpty, release |
| Field Detail |
|---|
public static final int DEFAULT_ARRAY_LENGTH
private final int arrayLength
| Constructor Detail |
|---|
public CharArrayPoolImpl()
public CharArrayPoolImpl(int capacity,
int arrayLength)
capacity - is the capacity of the pool.arrayLength - is the length of each pooled byte-array.| Method Detail |
|---|
protected char[] create()
create in class AbstractPool<char[]>protected boolean reset(char[] element)
element so it can be reused. It
is called if an element is released and will be
stored in the pool. The implementation depends on the type of element. Some
types may become inconsistent if they are directly reused. Further this
method may clear data from the element for security reasons, because the
same instance may be given to some other component that is NOT trusted
enough (because it may be vulnerably).
reset in class AbstractPool<char[]>element - the element to reset.
true if the given element can be reused
and should be added to the pool, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||