/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }
/** * Allocate a {@link Buffer} using the provided {@link ThreadLocalPool}. * * @param threadLocalCache the {@link ThreadLocalPool} to allocate from. * @param size the amount to allocate. * * @return an memory buffer, or <code>null</code> if the requested size * exceeds the remaining free memory of the {@link ThreadLocalPool}. */ protected Object allocateFromPool(final ThreadLocalPool threadLocalCache, final int size) { if (threadLocalCache.remaining() >= size) { ProbeNotifier.notifyBufferAllocatedFromPool(monitoringConfig, size); return threadLocalCache.allocate(size); } return null; }