com.sun.grizzly.memory.slab
Interface SlabMemoryManagerFactory.SlabPool

All Superinterfaces:
Closeable
All Known Implementing Classes:
SlabPoolImpl
Enclosing class:
SlabMemoryManagerFactory

public static interface SlabMemoryManagerFactory.SlabPool
extends Closeable

Obtain useful statistics about the SlabPool.


Method Summary
 long allocatedSpace()
          Total bytes allocated.
 boolean bufferType()
          The BufferType of every Slab in this pool.
 long freeSpace()
          Current free space in pool.
 int maxAllocationSize()
          The maxAllocationSize of every Slab in this pool.
 long maxSize()
          Maximum size to which pool may expand as specified when the SlabPool was created.
 long minSize()
          Minimum size of pool, as specified when the SlabPool was created.
 int numFreeSlabs()
          Number of free slabs available for use in Allocators using this SlabPool.
 int numFullSlabs()
          Number of full slabs which still have allocations in use.
 int numPartialSlabs()
          Number of slabs currently in use by Allocators.
 long unavailableSpace()
          Total bytes disposed but not yet available for use.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

maxAllocationSize

int maxAllocationSize()
The maxAllocationSize of every Slab in this pool.


bufferType

boolean bufferType()
The BufferType of every Slab in this pool.


numFreeSlabs

int numFreeSlabs()
Number of free slabs available for use in Allocators using this SlabPool.


numPartialSlabs

int numPartialSlabs()
Number of slabs currently in use by Allocators.


numFullSlabs

int numFullSlabs()
Number of full slabs which still have allocations in use. Full slabs become empty as soon as all of their allocations have been disposed.


minSize

long minSize()
Minimum size of pool, as specified when the SlabPool was created.


maxSize

long maxSize()
Maximum size to which pool may expand as specified when the SlabPool was created.


freeSpace

long freeSpace()
Current free space in pool. freeSpace() + allocatedSpace() is the total size of the pool. This may at times temporarily exceed maxSize, but excess space will be released from the pool when it is freed and the total size is bigger than the maximum size.


unavailableSpace

long unavailableSpace()
Total bytes disposed but not yet available for use. This is always less than allocatedSpace.


allocatedSpace

long allocatedSpace()
Total bytes allocated. This includes unavailableSpace(). allocatedSpace() - unavailableSpace() is the space still actively in use by clients of the SlabPool.



Copyright © 2009 SUN Microsystems. All Rights Reserved.