Class Header


  • class Header
    extends java.lang.Object
    The 1K block at the head of the entry logger file that contains the fingerprint and meta-data.
     Header is composed of:
     Fingerprint: 4 bytes "BKLO"
     Log file HeaderVersion enum: 4 bytes
     Ledger map offset: 8 bytes
     Ledgers Count: 4 bytes
     
    • Constructor Detail

      • Header

        Header()
    • Method Detail

      • extractVersion

        static int extractVersion​(io.netty.buffer.ByteBuf header)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • extractLedgerMapOffset

        static long extractLedgerMapOffset​(io.netty.buffer.ByteBuf header)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • extractLedgerCount

        static int extractLedgerCount​(io.netty.buffer.ByteBuf header)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • assertFingerPrint

        static void assertFingerPrint​(io.netty.buffer.ByteBuf header)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • writeEmptyHeader

        static void writeEmptyHeader​(io.netty.buffer.ByteBuf header)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writeHeader

        static void writeHeader​(io.netty.buffer.ByteBuf header,
                                long ledgerMapOffset,
                                int ledgerCount)
                         throws java.io.IOException
        Throws:
        java.io.IOException