Interface StateManager

  • All Superinterfaces:
    All Known Implementing Classes:

    public interface StateManager
    extends java.lang.AutoCloseable
    State management of Bookie, including register, turn bookie to w/r mode.
    • Method Detail

      • initState

        void initState()
        Init state of Bookie when launch bookie.
      • isAvailableForHighPriorityWrites

        boolean isAvailableForHighPriorityWrites()
        Check if the bookie is available for high priority writes or not.
        true if the bookie is available for high priority writes; otherwise false.
      • setHighPriorityWritesAvailability

        void setHighPriorityWritesAvailability​(boolean available)
        Enable/Disable the availability for high priority writes.
        available - the flag to enable/disable the availability for high priority writes.
      • isReadOnly

        boolean isReadOnly()
        Check is ReadOnly.
      • isForceReadOnly

        boolean isForceReadOnly()
        Check is forceReadOnly.
      • isReadOnlyModeEnabled

        boolean isReadOnlyModeEnabled()
        Check is readOnlyModeEnabled.
      • isRunning

        boolean isRunning()
        Check is Running.
      • isShuttingDown

        boolean isShuttingDown()
        Check is Shutting down.
      • close

        void close()
        Close the manager, release its resources.
        Specified by:
        close in interface java.lang.AutoCloseable
      • registerBookie

        java.util.concurrent.Future<java.lang.Void> registerBookie​(boolean throwException)
        Register the bookie to RegistrationManager.
      • forceToShuttingDown

        void forceToShuttingDown()
        Turn state to the shutting down progress,just the flag.
      • forceToReadOnly

        void forceToReadOnly()
        Turn state to the read only, just flag.
      • forceToUnregistered

        void forceToUnregistered()
        Turn state to not registered, just the flag.
      • transitionToWritableMode

        java.util.concurrent.Future<java.lang.Void> transitionToWritableMode()
        Change the state of bookie to Writable mode.
      • transitionToReadOnlyMode

        java.util.concurrent.Future<java.lang.Void> transitionToReadOnlyMode()
        Change the state of bookie to ReadOnly mode.