class LedgerRecoveryOp extends java.lang.Object implements org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListener, AsyncCallback.AddCallback
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
LedgerRecoveryOp.RecoveryReadOp |
| Modifier and Type | Field and Description |
|---|---|
(package private) ClientContext |
clientCtx |
(package private) long |
endEntryToRead |
(package private) org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListener |
entryListener |
(package private) LedgerHandle |
lh |
(package private) static org.slf4j.Logger |
LOG |
(package private) LedgerMetadata |
metadataForRecovery |
(package private) java.util.concurrent.CompletableFuture<LedgerHandle> |
promise |
(package private) java.util.concurrent.atomic.AtomicLong |
readCount |
(package private) boolean |
readDone |
(package private) long |
startEntryToRead |
(package private) java.util.concurrent.atomic.AtomicLong |
writeCount |
| Constructor and Description |
|---|
LedgerRecoveryOp(LedgerHandle lh,
ClientContext clientCtx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addComplete(int rc,
LedgerHandle lh,
long entryId,
java.lang.Object ctx)
Callback to implement if latency information is not desired.
|
java.util.concurrent.CompletableFuture<LedgerHandle> |
initiate() |
void |
onEntryComplete(int rc,
LedgerHandle lh,
LedgerEntry entry,
java.lang.Object ctx)
On given entry completed.
|
(package private) LedgerRecoveryOp |
setEntryListener(org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListener entryListener)
Set an entry listener to listen on individual recovery reads during recovery procedure.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCompleteWithLatencystatic final org.slf4j.Logger LOG
final LedgerHandle lh
final ClientContext clientCtx
final java.util.concurrent.CompletableFuture<LedgerHandle> promise
final java.util.concurrent.atomic.AtomicLong readCount
final java.util.concurrent.atomic.AtomicLong writeCount
volatile boolean readDone
volatile long startEntryToRead
volatile long endEntryToRead
LedgerMetadata metadataForRecovery
org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListener entryListener
public LedgerRecoveryOp(LedgerHandle lh, ClientContext clientCtx)
LedgerRecoveryOp setEntryListener(org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListener entryListener)
entryListener - entry listenerpublic java.util.concurrent.CompletableFuture<LedgerHandle> initiate()
public void onEntryComplete(int rc,
LedgerHandle lh,
LedgerEntry entry,
java.lang.Object ctx)
org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListeneronEntryComplete in interface org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.ReadEntryListenerrc - result code of reading this entry.lh - ledger handle.entry - ledger entry.ctx - callback context.public void addComplete(int rc,
LedgerHandle lh,
long entryId,
java.lang.Object ctx)
AsyncCallback.AddCallbackaddComplete in interface AsyncCallback.AddCallbackrc - return codelh - ledger handleentryId - entry identifierctx - context objectCopyright © 2011–2024 The Apache Software Foundation. All rights reserved.