NightOwl888 commented on issue #1151:
URL: https://github.com/apache/lucenenet/issues/1151#issuecomment-2752412160

   Well, the good news is nearly all of the classes that are part of the 
buffers API are internal, including `HeapByteBuffer`. So, if something is 
sealed it can be unsealed without breaking the public API.
   
   The DotNext code looks interesting. Looks like they are handling 
`ReadOnlySpan` using this around the public API of `MemoryMappedViewAccessor`.
   
   
![Image](https://github.com/user-attachments/assets/443e465f-2d8b-4245-9400-42983f02d7c0)
   
   Just a thought - it would be a lot simpler if the `ByteBuffer` size were the 
entire segment since by default `ByteBuffer` is fixed length. Then it could 
read and/or write locally and `Flush()` would just be to write the entire 
buffer back to the underlying view/segment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to