public class PulsarMockLedgerHandle
extends org.apache.bookkeeper.client.LedgerHandle
LedgerHandle. Used by PulsarMockBookKeeper.| Constructor and Description |
|---|
PulsarMockLedgerHandle(PulsarMockBookKeeper bk,
long id,
org.apache.bookkeeper.client.BookKeeper.DigestType digest,
byte[] passwd) |
| Modifier and Type | Method and Description |
|---|---|
long |
addEntry(byte[] data) |
void |
asyncAddEntry(byte[] data,
org.apache.bookkeeper.client.AsyncCallback.AddCallback cb,
Object ctx) |
void |
asyncAddEntry(byte[] data,
int offset,
int length,
org.apache.bookkeeper.client.AsyncCallback.AddCallback cb,
Object ctx) |
void |
asyncAddEntry(io.netty.buffer.ByteBuf data,
org.apache.bookkeeper.client.AsyncCallback.AddCallback cb,
Object ctx) |
void |
asyncClose(org.apache.bookkeeper.client.AsyncCallback.CloseCallback cb,
Object ctx) |
void |
asyncReadEntries(long firstEntry,
long lastEntry,
org.apache.bookkeeper.client.AsyncCallback.ReadCallback cb,
Object ctx) |
long |
getId() |
long |
getLastAddConfirmed() |
long |
getLength() |
boolean |
isClosed() |
CompletableFuture<org.apache.bookkeeper.client.api.LedgerEntries> |
readAsync(long firstEntry,
long lastEntry) |
CompletableFuture<org.apache.bookkeeper.client.api.LastConfirmedAndEntry> |
readLastAddConfirmedAndEntryAsync(long entryId,
long timeOutInMillis,
boolean parallel) |
CompletableFuture<Long> |
readLastAddConfirmedAsync() |
CompletableFuture<org.apache.bookkeeper.client.api.LedgerEntries> |
readUnconfirmedAsync(long firstEntry,
long lastEntry) |
CompletableFuture<Long> |
tryReadLastAddConfirmedAsync() |
addEntry, addEntry, addEntry, appendAsync, asyncAddEntry, asyncAddEntry, asyncAddEntry, asyncAddEntry, asyncReadExplicitLastConfirmed, asyncReadLastConfirmed, asyncReadLastConfirmedAndEntry, asyncReadLastEntry, asyncReadUnconfirmedEntries, asyncTryReadLastConfirmed, close, closeAsync, doAsyncAddEntry, force, getCtime, getCustomMetadata, getLastAddPushed, getLedgerKey, getLedgerMetadata, getNumBookies, getNumFragments, getWriteFlags, initializeWriteHandleState, readEntries, readExplicitLastConfirmed, readLastConfirmed, readLastEntry, readUnconfirmedEntries, tryReadLastConfirmed, waitForWritableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic PulsarMockLedgerHandle(PulsarMockBookKeeper bk, long id, org.apache.bookkeeper.client.BookKeeper.DigestType digest, byte[] passwd) throws GeneralSecurityException
GeneralSecurityExceptionpublic void asyncClose(org.apache.bookkeeper.client.AsyncCallback.CloseCallback cb,
Object ctx)
asyncClose in class org.apache.bookkeeper.client.LedgerHandlepublic void asyncReadEntries(long firstEntry,
long lastEntry,
org.apache.bookkeeper.client.AsyncCallback.ReadCallback cb,
Object ctx)
asyncReadEntries in class org.apache.bookkeeper.client.LedgerHandlepublic long addEntry(byte[] data)
throws InterruptedException,
org.apache.bookkeeper.client.BKException
addEntry in class org.apache.bookkeeper.client.LedgerHandleInterruptedExceptionorg.apache.bookkeeper.client.BKExceptionpublic void asyncAddEntry(byte[] data,
org.apache.bookkeeper.client.AsyncCallback.AddCallback cb,
Object ctx)
asyncAddEntry in class org.apache.bookkeeper.client.LedgerHandlepublic void asyncAddEntry(byte[] data,
int offset,
int length,
org.apache.bookkeeper.client.AsyncCallback.AddCallback cb,
Object ctx)
asyncAddEntry in class org.apache.bookkeeper.client.LedgerHandlepublic void asyncAddEntry(io.netty.buffer.ByteBuf data,
org.apache.bookkeeper.client.AsyncCallback.AddCallback cb,
Object ctx)
asyncAddEntry in class org.apache.bookkeeper.client.LedgerHandlepublic long getId()
getId in interface org.apache.bookkeeper.client.api.HandlegetId in class org.apache.bookkeeper.client.LedgerHandlepublic long getLastAddConfirmed()
getLastAddConfirmed in interface org.apache.bookkeeper.client.api.ReadHandlegetLastAddConfirmed in class org.apache.bookkeeper.client.LedgerHandlepublic long getLength()
getLength in interface org.apache.bookkeeper.client.api.ReadHandlegetLength in class org.apache.bookkeeper.client.LedgerHandlepublic CompletableFuture<org.apache.bookkeeper.client.api.LedgerEntries> readAsync(long firstEntry, long lastEntry)
readAsync in interface org.apache.bookkeeper.client.api.ReadHandlereadAsync in class org.apache.bookkeeper.client.LedgerHandlepublic CompletableFuture<org.apache.bookkeeper.client.api.LedgerEntries> readUnconfirmedAsync(long firstEntry, long lastEntry)
readUnconfirmedAsync in interface org.apache.bookkeeper.client.api.ReadHandlereadUnconfirmedAsync in class org.apache.bookkeeper.client.LedgerHandlepublic CompletableFuture<Long> readLastAddConfirmedAsync()
readLastAddConfirmedAsync in interface org.apache.bookkeeper.client.api.ReadHandlereadLastAddConfirmedAsync in class org.apache.bookkeeper.client.LedgerHandlepublic CompletableFuture<Long> tryReadLastAddConfirmedAsync()
tryReadLastAddConfirmedAsync in interface org.apache.bookkeeper.client.api.ReadHandletryReadLastAddConfirmedAsync in class org.apache.bookkeeper.client.LedgerHandlepublic boolean isClosed()
isClosed in interface org.apache.bookkeeper.client.api.ReadHandleisClosed in class org.apache.bookkeeper.client.LedgerHandlepublic CompletableFuture<org.apache.bookkeeper.client.api.LastConfirmedAndEntry> readLastAddConfirmedAndEntryAsync(long entryId, long timeOutInMillis, boolean parallel)
readLastAddConfirmedAndEntryAsync in interface org.apache.bookkeeper.client.api.ReadHandlereadLastAddConfirmedAndEntryAsync in class org.apache.bookkeeper.client.LedgerHandleCopyright © 2017–2021 Apache Software Foundation. All rights reserved.