Class DefaultEntryLogger.BufferedLogChannel

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    DefaultEntryLogger

    static class DefaultEntryLogger.BufferedLogChannel
    extends BufferedChannel
    • Constructor Detail

      • BufferedLogChannel

        public BufferedLogChannel​(io.netty.buffer.ByteBufAllocator allocator,
                                  java.nio.channels.FileChannel fc,
                                  int writeCapacity,
                                  int readCapacity,
                                  long logId,
                                  java.io.File logFile,
                                  long unpersistedBytesBound)
                           throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getLogId

        public long getLogId()
      • getLogFile

        public java.io.File getLogFile()
      • registerWrittenEntry

        public void registerWrittenEntry​(long ledgerId,
                                         long entrySize)
      • getLedgerIdAssigned

        public java.lang.Long getLedgerIdAssigned()
      • setLedgerIdAssigned

        public void setLedgerIdAssigned​(java.lang.Long ledgerId)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • appendLedgersMap

        void appendLedgersMap()
                       throws java.io.IOException
        Append the ledger map at the end of the entry log. Updates the entry log file header with the offset and size of the map.
        Throws:
        java.io.IOException