protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected HeapBuffer reallocateHeapBuffer(HeapBuffer oldHeapBuffer, int newSize) { if (oldHeapBuffer.capacity() >= newSize) return oldHeapBuffer; final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { final HeapBuffer newBuffer = memoryPool.reallocate(oldHeapBuffer, newSize); if (newBuffer != null) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, newSize - oldHeapBuffer.capacity()); return newBuffer; } } final HeapBuffer newHeapBuffer = allocateHeapBuffer(newSize); oldHeapBuffer.flip(); return newHeapBuffer.put(oldHeapBuffer); }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }
protected final void releaseHeapBuffer(final HeapBuffer heapBuffer) { final ThreadLocalPool<HeapBuffer> memoryPool = getHeapBufferThreadLocalPool(); if (memoryPool != null) { if (memoryPool.release(heapBuffer.clear())) { ProbeNotifier.notifyBufferReleasedToPool(monitoringConfig, heapBuffer.capacity()); } } }