class OffHeapByteBuffer implements OffHeapStore {

  public byte[] remove(Pointer pointer) {
    readWriteLock.writeLock(pointer.getPosition());
    try {
      final byte[] payload = retrieve(pointer);
      dirtyMemory.addAndGet(payload.length + POINTER_SIZE);
      markAsDirty(pointer.getPosition());
      return payload;
    } finally {
      readWriteLock.writeUnlock(pointer.getPosition());
    }
  }

  public  OffHeapByteBuffer(int index, int capacity);
  public  OffHeapByteBuffer(int index, int capacity, int concurrencyLevel);

}