public class LedgerChecker
extends java.lang.Object
NOTE: This class is tended to be used by this project only. External users should not rely on it directly.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
LedgerChecker.InvalidFragmentException |
| Modifier and Type | Field and Description |
|---|---|
org.apache.bookkeeper.proto.BookieClient |
bookieClient |
BookieWatcher |
bookieWatcher |
(package private) java.util.concurrent.Semaphore |
semaphore |
| Constructor and Description |
|---|
LedgerChecker(org.apache.bookkeeper.proto.BookieClient client,
BookieWatcher watcher) |
LedgerChecker(org.apache.bookkeeper.proto.BookieClient client,
BookieWatcher watcher,
int inFlightReadEntryNum) |
LedgerChecker(BookKeeper bkc) |
LedgerChecker(BookKeeper bkc,
int inFlightReadEntryNum) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquirePermit()
Acquires a permit from permit manager,
blocking until all are available.
|
void |
checkLedger(LedgerHandle lh,
org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.GenericCallback<java.util.Set<LedgerFragment>> cb)
Check that all the fragments in the passed in ledger, and report those
which are missing.
|
void |
checkLedger(LedgerHandle lh,
org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.GenericCallback<java.util.Set<LedgerFragment>> cb,
long percentageOfLedgerFragmentToBeVerified) |
void |
releasePermit()
Release a given permit.
|
public final org.apache.bookkeeper.proto.BookieClient bookieClient
public final BookieWatcher bookieWatcher
final java.util.concurrent.Semaphore semaphore
public LedgerChecker(BookKeeper bkc)
public LedgerChecker(org.apache.bookkeeper.proto.BookieClient client,
BookieWatcher watcher)
public LedgerChecker(BookKeeper bkc, int inFlightReadEntryNum)
public LedgerChecker(org.apache.bookkeeper.proto.BookieClient client,
BookieWatcher watcher,
int inFlightReadEntryNum)
public void acquirePermit()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void releasePermit()
public void checkLedger(LedgerHandle lh, org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.GenericCallback<java.util.Set<LedgerFragment>> cb)
public void checkLedger(LedgerHandle lh, org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.GenericCallback<java.util.Set<LedgerFragment>> cb, long percentageOfLedgerFragmentToBeVerified)
Copyright © 2011–2024 The Apache Software Foundation. All rights reserved.