class OffHeapByteBufferStore implements OffHeapStore {

  public Pointer store(byte[] payload, long expiry) {
    while (true) {
      try {
        return currentBuffer().store(payload, expiry);
      } catch (BufferOverflowException exception) {
        try {
          return currentBuffer().store(payload, expiry);
        } catch (BufferOverflowException overflowException) {
          nextBuffer();
          return store(payload, expiry);
        }
      }
    }
  }

  public  OffHeapByteBufferStore(int capacity, int bufferSize);
  public  OffHeapByteBufferStore(int capacity, int bufferSize, int concurrencyLevel);

}