Commit Graph

7 Commits

Author SHA1 Message Date
Chris Vest
289c9ebba1 Make Buffer.ensureWritable throw exceptions consistent with the rest of the API 2021-06-01 11:35:01 +02:00
Riley Park
c840a41e31
Move to custom exception types 2021-05-31 11:50:44 -07:00
Chris Vest
05d76c27c1 Hide isOwned, countBorrows, and acquire from the public API, even on CompositeBuffer 2021-05-27 17:34:40 +02:00
Chris Vest
1c25fa88b7 Fix test failures coming from removal of slice and introduction of copy. 2021-05-27 17:06:30 +02:00
Chris Vest
707e5e2afb Remove the slice methods, add copy methods 2021-05-27 14:07:31 +02:00
Chris Vest
f0ee2e1467 Remove acquire from the public API
This is a step toward effectively eliminating reference counting.
Reference counting is only needed when the memory in buffers can be shared.
If we remove all forms of sharing, then the buffers would be in an owned state at all times.
Then we would no longer need to worry about the state of the buffers before calling, e.g. `ensureWritable` and methods like that.

Just removing `acquire` is not enough; we also need to remove the `slice` method.
In this commit we are, however, starting with `acquire` because doing so requires rearranging the type hierarchy and the generics we have in play.
This was not an easy exercise, but for the purpose of record keeping, it's useful to have that work separate from the work of removing `slice`.
2021-05-26 17:19:26 +02:00
Chris Vest
1143223407 First draft of splitting the repo into multiple modules and allowing builds with Java 11 2021-05-21 14:04:23 +02:00