netty-incubator-buffer-api/src/main/java/io/netty/buffer/api
Chris Vest b749106c0c Add a Buf.bifurcate method
Motivation:
There are use cases that involve accumulating data into a buffer, then carving out prefix slices and sending them off on their own journey for further processing.

Modification:
Add a Buf.bifurcate API, that split a buffer, and its ownership, in two.
Internally, the API will inject and maintain an atomically reference counted Drop instance, so that the original memory segment is not released until all bifurcated parts are closed.
This works particularly well for composite buffers, where only the buffer (if any) wherein the bifurcation point lands, will actually have its memory split. A composite buffer can otherwise just crack its buffer array in two.

Result:
We now have a safe way of breaking the single ownership of some memory into multiple parts, that can be sent and owned independently.
2020-12-10 10:29:31 +01:00
..
memseg Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
Allocator.java Make it possible to extend composite buffers after creation 2020-12-03 17:48:28 +01:00
AllocatorControl.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
Buf.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
BufAccessors.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
ByteCursor.java Update ByteCursor method names and related javadocs 2020-12-09 11:03:30 +01:00
CompositeBuf.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
Drop.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
ManagedAllocator.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
MemoryManager.java Move the MemorySegment based Buf implementation to its own package, and break the remaining bits of tight coupling. 2020-11-17 15:53:40 +01:00
NativeMemoryCleanerDrop.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
Owned.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
package-info.java Add a docker-based build 2020-11-18 17:16:37 +01:00
Rc.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
RcSupport.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
ResourceDisposeFailedException.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
Scope.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
Send.java Rename the 'b2' package to 'api' 2020-11-17 15:40:13 +01:00
SizeClassedMemoryPool.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00
Statics.java Move the MemorySegment based Buf implementation to its own package, and break the remaining bits of tight coupling. 2020-11-17 15:53:40 +01:00
TransferSend.java Add a Buf.bifurcate method 2020-12-10 10:29:31 +01:00