amaliujia opened a new pull request, #1631:
URL: https://github.com/apache/ratis/pull/1631
## What changes were proposed in this pull request?
The Message interface has only one method to get its data:
```
// Message.java
ByteString getContent();
```
So every implementation has to serialize its data into a protobuf
ByteString. Applications whose data is already in a ByteBuffer, such as a
direct or pooled buffer, or data read from a file or network channel, must
either copy it with ByteString.copyFrom(..) or call
UnsafeByteOperations.unsafeWrap(..) themselves.
In this JIRA, we add optional support for ByteBuffer. When an implementation
supports ByteBuffer, Ratis never calls getContent().
## How was this patch tested?
Unit test and existing test
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]