Skip to content

Refine LedgerEntry interface #731

@jiazhai

Description

@jiazhai

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions