Go to file
Chris Vest 7f9ed7dec7 Implement Buf.slice()
Motivation:
Slicing gives you a derived buffer. This is useful for sending along just the part of a buffer that has the relevant data, or to get a new buffer instance for the same data, but with independent read and write offsets.

Modification:
Add slice() methods to the Buf interface, and implement them for MemSegBuf.
Buffer slices increments the reference count of the parent buffer, which prevents the parent from being send()-able.
Slices are themselves also not send()-able.
This is because send() involves ownership transfer, while slicing is like lending out mutable borrows.
The send() capability returns to the parent buffer once all slices are closed.
2020-11-17 15:26:57 +01:00
buffer/src Implement Buf.slice() 2020-11-17 15:26:57 +01:00
microbench/src/main/java/io/netty/buffer Hide the memory segment buffer implementation behind the MemoryManager interface 2020-11-17 15:26:57 +01:00
.gitignore Prepare incubator repo for new buffer API 2020-11-17 14:56:28 +01:00
pom.xml Pom updates 2020-11-17 15:26:57 +01:00
README.md Prepare incubator repo for new buffer API 2020-11-17 14:56:28 +01:00

Netty Incubator Buffer API

This repository is incubating a new buffer API proposed for Netty 5.