Chris Vest
492977d9be
Introduce Deref abstraction
Motivation: Sometimes, we wish to operate on both buffers and anything that can produce a buffer. For instance, when making a composite buffer, we could compose either buffers or sends. Modification: Introduce a Deref interface, which is extended by both Rc and Send. A Deref can be used to acquire an Rc instance, and in doing so will also acquire a reference to the Rc. That is, dereferencing increases the reference count. For Rc itself, this just delegates to Rc.acquire, while for Send it delegates to Send.receive, and can only be called once. The Allocator.compose method has been changed to take Derefs. This allows us to compose either Bufs or Sends of bufs. Or a mix. Extra care and caution has been added to the code, to make sure the reference counts are managed correctly when composing buffers, now that it's a more complicated operation. A handful of convenience methods for working with Sends have also been added to the Send interface. Result: We can now build a composite buffer out of sends of buffers.
Netty Incubator Buffer API
This repository is incubating a new buffer API proposed for Netty 5.
Building and Testing
Short version: just run make
.
The project currently relies on snapshot versions of the Panama Foreign fork of OpenJDK.
This allows us to test out the most recent version of the jdk.incubator.foreign
APIs, but also make building, and local development more involved.
To simplify things, we have a Docker based build, controlled via a Makefile with the following commands:
image
– build the docker image. This includes building a snapshot of OpenJDK, and download all relevant Maven dependencies.test
– run all tests in a docker container. This impliesimage
. The container is automatically deleted afterwards.dbg
– drop into a shell in the build container, without running the build itself. The debugging container is not deleted afterwards.clean
– remove the leftover containers created bydbg
,test
, andbuild
.build
– build binaries and run all tests in a container, and copy thetarget
directory out of the container afterwards. This is the default build target.
Description
Languages
Java
99.6%
Dockerfile
0.2%
Makefile
0.2%