-
Notifications
You must be signed in to change notification settings - Fork 85
New write() Methods in Bytes #54
Comments
Can you not set the position and limit of the ByteBuffer and Bytes when you
|
The buffer backing the ring buffer is visible to multiple writers and a reader. So no, I cannot. I could change the position and limit of the source buffer when writing into the ring buffer but I would still be unable to read back from this buffer when it comes time to read from it. |
BTW you can use MultiStoreBytes to solve the problem right now. But I agree such methods would be useful. |
I agree the methods would be useful. Btw you can take a ByteBuffer.slice ()
|
Thank you for your suggestions but I am trying to stay allocation free in this part of the system. I am there other than for this call. |
These functions have been added to Chronicle Bytes |
Please consider adding positional buffer write methods to
NativeBytes
. Currently the only available method that comes close is:However I am writing lock free many to one and one to many ring buffers. Not having a positional index makes it very difficult because I can't use/move the position of any of the buffers.
If the following write methods
were added it would make this use case possible.
I have the same problem for reading, I am using buffers but only
byte[]
is supported via:The text was updated successfully, but these errors were encountered: