MemoryManager abstraction to provide utilities that may be useful across different MemoryManager
implementations.
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | AbstractMemoryManager.
This is a marker interface indicating a particular |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_MAX_BUFFER_SIZE
The maximum size of the memory pool that is to be maintained by either the MemoryManager itself or any
|
| protected final int | |
| protected final DefaultMonitoringConfig | monitoringConfig
Basic monitoring support. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | AbstractMemoryManager(final int
max size of the maintained buffer. maxBufferSize)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | Returns: an memory buffer, ornull if the requested size exceeds the remaining free memory of the
ThreadLocalPool.the threadLocalCache, final int ThreadLocalPool to allocate from.the amount to allocate. size)Allocate a |
| protected abstract Object | createJmxManagementObject()
Returns: the JMX |
| public int | |
| public int | Returns: the size of local thread memory pool.Get the size of local thread memory pool. |
| protected static ThreadLocalPool | Returns: thread associated buffer pool. This method may returnnull if the current thread doesn't have a
buffer pool associated with it.Get thread associated buffer pool. |
| DEFAULT_MAX_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_MAX_BUFFER_SIZE The maximum size of the memory pool that is to be maintained by either the MemoryManager itself or any
| |
| maxBufferSize | back to summary |
|---|---|
| protected final int maxBufferSize | |
| monitoringConfig | back to summary |
|---|---|
| protected final DefaultMonitoringConfig<MemoryProbe> monitoringConfig Basic monitoring support. Concrete implementations of this class need only to implement the
| |
| AbstractMemoryManager | back to summary |
|---|---|
| public AbstractMemoryManager() Creates a new | |
| AbstractMemoryManager | back to summary |
|---|---|
| public AbstractMemoryManager(final int maxBufferSize) Creates a new
| |
| allocateFromPool | back to summary |
|---|---|
| protected Object allocateFromPool(final ThreadLocalPool<E> threadLocalCache, final int size) Allocate a
| |
| createJmxManagementObject | back to summary |
|---|---|
| protected abstract Object createJmxManagementObject() | |
| getMaxBufferSize | back to summary |
|---|---|
public int getMaxBufferSize()
| |
| getReadyThreadBufferSize | back to summary |
|---|---|
| public int getReadyThreadBufferSize() Get the size of local thread memory pool.
| |
| getThreadLocalPool | back to summary |
|---|---|
| protected static ThreadLocalPool Get thread associated buffer pool.
| |
Buffer implementation can be trimmed.