@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public ByteBuffer reallocate(ByteBuffer oldByteBuffer, int newSize) { if (isLastAllocated(oldByteBuffer) && remaining() + oldByteBuffer.capacity() >= newSize) { lastAllocatedIndex--; pool.position(pool.position() - oldByteBuffer.capacity()); final ByteBuffer newByteBuffer = Buffers.slice(pool, newSize); newByteBuffer.position(oldByteBuffer.position()); return addHistory(newByteBuffer); } return null; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }
@Override public boolean release(ByteBuffer underlyingBuffer) { if (isLastAllocated(underlyingBuffer)) { pool.position(pool.position() - underlyingBuffer.capacity()); allocationHistory[--lastAllocatedIndex] = null; return true; } else if (wantReset(underlyingBuffer.capacity())) { reset(underlyingBuffer); return true; } return false; }