protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }
@Override public HeapBuffer reduceLastAllocated(final HeapBuffer heapBuffer) { final int newPos = heapBuffer.offset + heapBuffer.cap; ProbeNotifier.notifyBufferReleasedToPool(mm.monitoringConfig, rightPos - newPos); rightPos = newPos; return null; }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }
@Override public HeapBuffer reduceLastAllocated(final HeapBuffer heapBuffer) { final int newPos = heapBuffer.offset + heapBuffer.cap; ProbeNotifier.notifyBufferReleasedToPool(mm.monitoringConfig, rightPos - newPos); rightPos = newPos; return null; }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }
@Override public HeapBuffer reduceLastAllocated(final HeapBuffer heapBuffer) { final int newPos = heapBuffer.offset + heapBuffer.cap; ProbeNotifier.notifyBufferReleasedToPool(mm.monitoringConfig, rightPos - newPos); rightPos = newPos; return null; }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }
@Override public HeapBuffer reduceLastAllocated(final HeapBuffer heapBuffer) { final int newPos = heapBuffer.offset + heapBuffer.cap; ProbeNotifier.notifyBufferReleasedToPool(mm.monitoringConfig, rightPos - newPos); rightPos = newPos; return null; }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }
@Override public HeapBuffer reduceLastAllocated(final HeapBuffer heapBuffer) { final int newPos = heapBuffer.offset + heapBuffer.cap; ProbeNotifier.notifyBufferReleasedToPool(mm.monitoringConfig, rightPos - newPos); rightPos = newPos; return null; }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }
@Override public HeapBuffer reduceLastAllocated(final HeapBuffer heapBuffer) { final int newPos = heapBuffer.offset + heapBuffer.cap; ProbeNotifier.notifyBufferReleasedToPool(mm.monitoringConfig, rightPos - newPos); rightPos = newPos; return null; }
protected SmallByteBufferWrapper createSmallBuffer() { final SmallByteBufferWrapper buffer = ThreadCache.takeFromCache(SMALL_BUFFER_CACHE_IDX); if (buffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, maxSmallBufferSize); return buffer; } return new SmallByteBufferWrapper(allocateByteBuffer0(maxSmallBufferSize)); }
protected final ByteBuffer allocateByteBuffer0(final int size) { ProbeNotifier.notifyBufferAllocated(monitoringConfig, size); if (isDirect) { return ByteBuffer.allocateDirect(size); } else { return ByteBuffer.allocate(size); } }