Class IndexInMemPageMgr


  • class IndexInMemPageMgr
    extends java.lang.Object
    • Field Detail

      • pageSize

        final int pageSize
      • entriesPerPage

        final int entriesPerPage
      • pageLimit

        final int pageLimit
      • pageMapAndList

        final org.apache.bookkeeper.bookie.IndexInMemPageMgr.InMemPageCollection pageMapAndList
    • Method Detail

      • getPageSize

        public int getPageSize()
        Returns:
        page size used in ledger cache
      • getLedgerEntryPage

        LedgerEntryPage getLedgerEntryPage​(long ledger,
                                           long pageEntry)
                                    throws java.io.IOException
        Get the ledger entry page for a given pageEntry.
        Parameters:
        ledger - ledger id
        pageEntry - first entry id of a given page
        Returns:
        ledger entry page
        Throws:
        java.io.IOException
      • getLedgerEntryPageFromCache

        LedgerEntryPage getLedgerEntryPageFromCache​(long ledger,
                                                    long firstEntry,
                                                    boolean onlyDirty)
      • removePagesForLedger

        void removePagesForLedger​(long ledgerId)
      • getLastEntryInMem

        long getLastEntryInMem​(long ledgerId)
      • flushOneOrMoreLedgers

        void flushOneOrMoreLedgers​(boolean doAll)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • putEntryOffset

        void putEntryOffset​(long ledger,
                            long entry,
                            long offset)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getEntryOffset

        long getEntryOffset​(long ledger,
                            long entry)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • listEntries

        public LedgerCache.PageEntriesIterable listEntries​(long ledgerId)
                                                    throws java.io.IOException
        Return iterator over pages for mapping entries to entry loggers.
        Parameters:
        ledgerId -
        Returns:
        Iterator over pages
        Throws:
        java.io.IOException