|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.memory.slab.SlabMemoryManagerFactory
public class SlabMemoryManagerFactory
Factory for Allocators (pooled and non-pooled) and SlabPools.
| Nested Class Summary | |
|---|---|
static interface |
SlabMemoryManagerFactory.SlabPool
Obtain useful statistics about the SlabPool. |
| Field Summary | |
|---|---|
static boolean |
DEFAULT_BYTE_BUFFER_TYPE
|
static long |
DEFAULT_POOL_MAX_SIZE
Default max size of which the pool my grow to |
static long |
DEFAULT_POOL_MIN_SIZE
The default minimum size of the pool in bytes. |
static int |
DEFAULT_SLAB_SIZE
The default maximum size that can be satisfied by a call to Allocator.allocate(). |
| Method Summary | |
|---|---|
static MemoryManager |
makeAllocator()
|
static MemoryManager |
makeAllocator(int allocatorSize,
boolean bufferType)
Return an Allocator that allocates from one slab at a time, creating a new slab as needed. |
static SlabMemoryManagerFactory.SlabPool |
makeDefaultSlabPool()
Get a SlabPool with defaults |
static MemoryManager |
makePoolAllocator(SlabMemoryManagerFactory.SlabPool pool)
Create an Allocator that allocates from a pool of slabs. |
static SlabMemoryManagerFactory.SlabPool |
makeSlabPool(int maxAllocationSize,
long minSize,
long maxSize,
boolean bufferType)
Create a SlabPool from which Allocators may be created. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_SLAB_SIZE
public static final long DEFAULT_POOL_MAX_SIZE
public static final long DEFAULT_POOL_MIN_SIZE
public static final boolean DEFAULT_BYTE_BUFFER_TYPE
| Method Detail |
|---|
public static MemoryManager makeAllocator(int allocatorSize,
boolean bufferType)
allocatorSize - The total size available for all allocate calls in a single Allocator.bufferType - The buffer type of the slabs created for this allocator.
public static MemoryManager makeAllocator()
public static MemoryManager makePoolAllocator(SlabMemoryManagerFactory.SlabPool pool)
pool - The SlabPool to use for Slabs for this Allocator.
public static SlabMemoryManagerFactory.SlabPool makeSlabPool(int maxAllocationSize,
long minSize,
long maxSize,
boolean bufferType)
maxAllocationSize - The maximum size that can be satisfied
by a call to Allocator.allocate().minSize - The minimum size of the pool in bytes.maxSize - The maximum size to which a pool may grow.bufferType - The buffer type used in this pool.public static SlabMemoryManagerFactory.SlabPool makeDefaultSlabPool()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||