Package org.apache.bookkeeper.bookie
Class InterleavedStorageRegenerateIndexOp.DryRunLedgerCache
- java.lang.Object
-
- org.apache.bookkeeper.bookie.InterleavedStorageRegenerateIndexOp.DryRunLedgerCache
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LedgerCache
- Enclosing class:
- InterleavedStorageRegenerateIndexOp
static class InterleavedStorageRegenerateIndexOp.DryRunLedgerCache extends java.lang.Object implements LedgerCache
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.bookkeeper.bookie.LedgerCache
LedgerCache.LedgerIndexMetadata, LedgerCache.NoIndexForLedgerException, LedgerCache.PageEntries, LedgerCache.PageEntriesIterable
-
-
Constructor Summary
Constructors Constructor Description DryRunLedgerCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelWaitForLastAddConfirmedUpdate(long ledgerId, Watcher<LastAddConfirmedUpdateNotification> watcher)
void
close()
void
deleteLedger(long ledgerId)
void
flushLedger(boolean doAll)
java.util.PrimitiveIterator.OfLong
getEntriesIterator(long ledgerId)
long
getEntryOffset(long ledger, long entry)
io.netty.buffer.ByteBuf
getExplicitLac(long ledgerId)
java.lang.Long
getLastAddConfirmed(long ledgerId)
long
getLastEntry(long ledgerId)
boolean
isFenced(long ledgerId)
boolean
ledgerExists(long ledgerId)
LedgerCache.PageEntriesIterable
listEntries(long ledgerId)
void
putEntryOffset(long ledger, long entry, long offset)
LedgerCache.LedgerIndexMetadata
readLedgerIndexMetadata(long ledgerId)
byte[]
readMasterKey(long ledgerId)
void
setExplicitLac(long ledgerId, io.netty.buffer.ByteBuf lac)
boolean
setFenced(long ledgerId)
void
setMasterKey(long ledgerId, byte[] masterKey)
long
updateLastAddConfirmed(long ledgerId, long lac)
boolean
waitForLastAddConfirmedUpdate(long ledgerId, long previousLAC, Watcher<LastAddConfirmedUpdateNotification> watcher)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
setFenced
public boolean setFenced(long ledgerId) throws java.io.IOException
- Specified by:
setFenced
in interfaceLedgerCache
- Throws:
java.io.IOException
-
isFenced
public boolean isFenced(long ledgerId) throws java.io.IOException
- Specified by:
isFenced
in interfaceLedgerCache
- Throws:
java.io.IOException
-
setMasterKey
public void setMasterKey(long ledgerId, byte[] masterKey) throws java.io.IOException
- Specified by:
setMasterKey
in interfaceLedgerCache
- Throws:
java.io.IOException
-
readMasterKey
public byte[] readMasterKey(long ledgerId) throws java.io.IOException, BookieException
- Specified by:
readMasterKey
in interfaceLedgerCache
- Throws:
java.io.IOException
BookieException
-
ledgerExists
public boolean ledgerExists(long ledgerId) throws java.io.IOException
- Specified by:
ledgerExists
in interfaceLedgerCache
- Throws:
java.io.IOException
-
putEntryOffset
public void putEntryOffset(long ledger, long entry, long offset) throws java.io.IOException
- Specified by:
putEntryOffset
in interfaceLedgerCache
- Throws:
java.io.IOException
-
getEntryOffset
public long getEntryOffset(long ledger, long entry) throws java.io.IOException
- Specified by:
getEntryOffset
in interfaceLedgerCache
- Throws:
java.io.IOException
-
flushLedger
public void flushLedger(boolean doAll) throws java.io.IOException
- Specified by:
flushLedger
in interfaceLedgerCache
- Throws:
java.io.IOException
-
getLastEntry
public long getLastEntry(long ledgerId) throws java.io.IOException
- Specified by:
getLastEntry
in interfaceLedgerCache
- Throws:
java.io.IOException
-
getLastAddConfirmed
public java.lang.Long getLastAddConfirmed(long ledgerId) throws java.io.IOException
- Specified by:
getLastAddConfirmed
in interfaceLedgerCache
- Throws:
java.io.IOException
-
updateLastAddConfirmed
public long updateLastAddConfirmed(long ledgerId, long lac) throws java.io.IOException
- Specified by:
updateLastAddConfirmed
in interfaceLedgerCache
- Throws:
java.io.IOException
-
waitForLastAddConfirmedUpdate
public boolean waitForLastAddConfirmedUpdate(long ledgerId, long previousLAC, Watcher<LastAddConfirmedUpdateNotification> watcher) throws java.io.IOException
- Specified by:
waitForLastAddConfirmedUpdate
in interfaceLedgerCache
- Throws:
java.io.IOException
-
cancelWaitForLastAddConfirmedUpdate
public void cancelWaitForLastAddConfirmedUpdate(long ledgerId, Watcher<LastAddConfirmedUpdateNotification> watcher) throws java.io.IOException
- Specified by:
cancelWaitForLastAddConfirmedUpdate
in interfaceLedgerCache
- Throws:
java.io.IOException
-
deleteLedger
public void deleteLedger(long ledgerId) throws java.io.IOException
- Specified by:
deleteLedger
in interfaceLedgerCache
- Throws:
java.io.IOException
-
setExplicitLac
public void setExplicitLac(long ledgerId, io.netty.buffer.ByteBuf lac) throws java.io.IOException
- Specified by:
setExplicitLac
in interfaceLedgerCache
- Throws:
java.io.IOException
-
getExplicitLac
public io.netty.buffer.ByteBuf getExplicitLac(long ledgerId)
- Specified by:
getExplicitLac
in interfaceLedgerCache
-
listEntries
public LedgerCache.PageEntriesIterable listEntries(long ledgerId) throws java.io.IOException
- Specified by:
listEntries
in interfaceLedgerCache
- Throws:
java.io.IOException
-
readLedgerIndexMetadata
public LedgerCache.LedgerIndexMetadata readLedgerIndexMetadata(long ledgerId) throws java.io.IOException
- Specified by:
readLedgerIndexMetadata
in interfaceLedgerCache
- Throws:
java.io.IOException
-
getEntriesIterator
public java.util.PrimitiveIterator.OfLong getEntriesIterator(long ledgerId) throws java.io.IOException
- Specified by:
getEntriesIterator
in interfaceLedgerCache
- Throws:
java.io.IOException
-
-