public class LedgerEntriesImpl extends java.lang.Object implements LedgerEntries
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close to release the resources held by this instance.
|
static LedgerEntriesImpl |
create(java.util.List<LedgerEntry> entries)
Create ledger entries.
|
LedgerEntry |
getEntry(long entryId)
Gets a specific LedgerEntry by entryId.
|
java.util.Iterator<LedgerEntry> |
iterator()
Get an iterator over all the ledger entries contained in the
LedgerEntries object.
|
public static LedgerEntriesImpl create(java.util.List<LedgerEntry> entries)
entries - the entries with orderingpublic LedgerEntry getEntry(long entryId)
getEntry in interface LedgerEntriesentryId - the LedgerEntry idpublic java.util.Iterator<LedgerEntry> iterator()
Calling this method does not modify the reference count of the ByteBuf in the returned LedgerEntry objects.
The caller who calls LedgerEntries.iterator() should make sure that they do not call ByteBuf.release() on the
LedgerEntry objects to avoid a double free.
All reference counts will be decremented when the containing LedgerEntries object is closed via LedgerEntries.close().
iterator in interface java.lang.Iterable<LedgerEntry>iterator in interface LedgerEntriespublic void close()
LedgerEntriesclose in interface java.lang.AutoCloseableclose in interface LedgerEntriesCopyright © 2011–2024 The Apache Software Foundation. All rights reserved.