Interface Bookie

    • Method Detail

      • start

        void start()
      • join

        void join()
           throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • isRunning

        boolean isRunning()
      • getExitCode

        int getExitCode()
      • shutdown

        int shutdown()
      • isAvailableForHighPriorityWrites

        boolean isAvailableForHighPriorityWrites()
      • isReadOnly

        boolean isReadOnly()
      • getTotalDiskSpace

        long getTotalDiskSpace()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getTotalFreeSpace

        long getTotalFreeSpace()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readLastAddConfirmed

        long readLastAddConfirmed​(long ledgerId)
                           throws java.io.IOException,
                                  BookieException
        Throws:
        java.io.IOException
        BookieException
      • fenceLedger

        java.util.concurrent.CompletableFuture<java.lang.Boolean> fenceLedger​(long ledgerId,
                                                                              byte[] masterKey)
                                                                       throws java.io.IOException,
                                                                              BookieException
        Fences a ledger. From this point on, clients will be unable to write to this ledger. Only recoveryAddEntry will be able to add entries to the ledger. This method is idempotent. Once a ledger is fenced, it can never be unfenced. Fencing a fenced ledger has no effect.
        Returns:
        Throws:
        java.io.IOException
        BookieException
      • waitForLastAddConfirmedUpdate

        boolean waitForLastAddConfirmedUpdate​(long ledgerId,
                                              long previousLAC,
                                              Watcher<LastAddConfirmedUpdateNotification> watcher)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • cancelWaitForLastAddConfirmedUpdate

        void cancelWaitForLastAddConfirmedUpdate​(long ledgerId,
                                                 Watcher<LastAddConfirmedUpdateNotification> watcher)
                                          throws java.io.IOException
        Throws:
        java.io.IOException