class OffHeapByteBuffer implements OffHeapStore {

  protected Allocation allocate(byte[] payload) {
    final int payloadLength = payload.length + POINTER_SIZE;
    final int allocationOffset = offset.addAndGet(payloadLength);
    if (this.capacity < allocationOffset) {
      throw new BufferOverflowException();
    }
    return new Allocation(allocationOffset - payloadLength, payloadLength);
  }

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

}