BufferCursor lacks get/write methods compared to DirectBuffer:
key/val get/write boolean data
key/val write byte[] data, int offset, int length
It is also difficult to keep track of the length of the key and value being written since keyWriteIndex and valWriteIndex are not (read) accessible. They could be accessible through those methods:
cursorKeyLength()
cursorValLength()
I must admit I hesitated between the cursorKeyLength() and bufferedKeyLength() method naming.
If you are interested I will propose a pull request with unit tests.
There might some other methods missing, but this will be small next step.
Hi,
BufferCursor lacks get/write methods compared to DirectBuffer:
It is also difficult to keep track of the length of the key and value being written since keyWriteIndex and valWriteIndex are not (read) accessible. They could be accessible through those methods:
I must admit I hesitated between the cursorKeyLength() and bufferedKeyLength() method naming. If you are interested I will propose a pull request with unit tests. There might some other methods missing, but this will be small next step.