Skip to content

Commit 45f7a92

Browse files
Fix documentation terminology and method usage (#4617)
Fix documentation terminology and method usage
1 parent 4e6583d commit 45f7a92

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

site3/website/docs/api/ledger-api.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ long entryId = ledger.addEntry("Some entry data".getBytes());
163163
## Reading entries from ledgers
164164

165165
```java
166-
Enumerator<LedgerEntry> entries = handle.readEntries(1, 99);
166+
Enumeration<LedgerEntry> entries = handle.readEntries(1, 99);
167167
```
168168

169169
To read all possible entries from the ledger:
170170

171171
```java
172-
Enumerator<LedgerEntry> entries =
172+
Enumeration<LedgerEntry> entries =
173173
handle.readEntries(0, handle.getLastAddConfirmed());
174174

175175
while (entries.hasNextElement()) {
@@ -187,12 +187,12 @@ For entries outside that range it is possible that the writer never received the
187187
With this method you can even read entries before the LastAddConfirmed and entries after it with one call, the expected consistency will be as described above.
188188

189189
```java
190-
Enumerator<LedgerEntry> entries =
190+
Enumeration<LedgerEntry> entries =
191191
handle.readUnconfirmedEntries(0, lastEntryIdExpectedToRead);
192192

193-
while (entries.hasNextElement()) {
193+
while (entries.hasMoreElements()) {
194194
LedgerEntry entry = entries.nextElement();
195-
System.out.println("Successfully read entry " + entry.getId());
195+
System.out.println("Successfully read entry " + entry.getEntryId());
196196
}
197197
```
198198

@@ -216,7 +216,8 @@ Ledgers can also be deleted asynchronously:
216216

217217
```java
218218
class DeleteEntryCallback implements AsyncCallback.DeleteCallback {
219-
public void deleteComplete() {
219+
@Override
220+
public void deleteComplete(int rc, Object ctx) {
220221
System.out.println("Delete completed");
221222
}
222223
}

0 commit comments

Comments
 (0)