|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MemoryManager<E extends Buffer>
MemoryManager, responsible for allocating and releasing memory,
required during application runtime.
MemoryManager implementations work with Grizzly Buffers.
Buffer| Method Summary | |
|---|---|
E |
allocate(int size)
Allocated Buffer of the required size. |
E |
reallocate(E oldBuffer,
int newSize)
Reallocate Buffer to a required size. |
void |
release(E buffer)
Release Buffer. |
| Method Detail |
|---|
E allocate(int size)
Buffer of the required size.
size - Buffer size to be allocated.
Buffer.
E reallocate(E oldBuffer,
int newSize)
Buffer to a required size.
Implementation may choose the way, how reallocation could be done, either
by allocating new Buffer of required size and copying old
Buffer content there, or perform more complex logic related to
memory pooling etc.
oldBuffer - old Buffer to be reallocated.newSize - new Buffer required size.
Buffer.void release(E buffer)
Buffer.
Implementation may ignore releasing and let JVM Garbage collector to take
care about the Buffer, or return Buffer to pool, in case
of more complex MemoryManager implementation.
buffer - Buffer to be released.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||