szetszwo commented on PR #1007:
URL: https://github.com/apache/ratis/pull/1007#issuecomment-1886533938
The code looks like below:
```java
default int write(LogEntryProto entry) throws IOException {
throw new UnsupportedOperationException();
}
default int write(ReferenceCountedObject<LogEntryProto>
referenceCountedEntry) throws IOException {
LogEntryProto entry = copy(referenceCountedEntry.get())
return write();
}
```
Applications can override either of the methods. The ratis code will call
`write(ReferenceCountedObject<LogEntryProto>)`.
--
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]