In review of #727, @sijie suggested to refine the LedgerEntry interface:
The LedgerEntry interface is completely a mess. getEntry() and getEntryBuffer() have completely different behaviors. getEntry() releases bytebuf automatically, while getEntryBuffer() returns the bytebuf (if you don't call getEntry, you are responsible for releasing the entry buffer.
suggest:
removing getEntry() from LedgerEntry, or make it reenterable.
make LedgerEntry implement AutoCloseable. LedgerEntry should be responsible for releasing the bytebuf it is holding.
LedgerEntry should implement duplicate method.
In review of #727, @sijie suggested to refine the LedgerEntry interface:
The LedgerEntry interface is completely a mess. getEntry() and getEntryBuffer() have completely different behaviors. getEntry() releases bytebuf automatically, while getEntryBuffer() returns the bytebuf (if you don't call getEntry, you are responsible for releasing the entry buffer.
suggest:
removing getEntry() from LedgerEntry, or make it reenterable.
make LedgerEntry implement AutoCloseable. LedgerEntry should be responsible for releasing the bytebuf it is holding.
LedgerEntry should implement duplicate method.