|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.objectweb.jonathan.libs.resources.JChunkFactory
A Chunk Factory implementation.
A chunk factory creates and manages chunks. This chunk factory manages two pools of chunks of different sizes, so that a released chunk may be reused in a different context, saving the time for allocating and collecting the associated memory. The sizes of the chunks used, and of the preallocated pools may be changed.
| Field Summary | |
boolean |
verbose
Indicates whether warning message should be printed to stderr. |
| Method Summary | |
Chunk |
newChunk()
Returns a chunk of a default (small) size. |
Chunk |
newChunk(int size)
Returns a chunk of (at least) the specified size. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean verbose
In particular, if verbose is true, and if all the chunks in a pool are used, a warning will be emitted. This may be useful to tune the pool sizes.
This value is defined under the name "/jonathan/JChunkFactory/verbose"
in the bootstrap context.
| Method Detail |
public Chunk newChunk()
newChunk in interface ChunkFactorypublic Chunk newChunk(int size)
This method may return a larger chunk than expected.
newChunk in interface ChunkFactorysize - the expected size of the chunk.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||