Class ServerStatusManager

java.lang.Object
com.linecorp.centraldogma.server.management.ServerStatusManager

public final class ServerStatusManager extends Object
Manages the server status.
  • Constructor Details

    • ServerStatusManager

      public ServerStatusManager(File dataDir)
      Creates a new instance with the specified dataDir.
  • Method Details

    • serverStatus

      public ServerStatus serverStatus()
      Reads the ServerStatus from the "<data-dir>/server-status.properties" file.

      The stored ServerStatus may be used to determine whether the server is writable and replicating when the server is started.

    • updateStatus

      public void updateStatus(ServerStatus newServerStatus)
      Updates the server status with the specified writable and replicating values.

      The status may be stored in the "<data-dir>/server-status.properties" file so that the server can be initialized with the same status when it is restarted.

    • sequentialExecutor

      public Executor sequentialExecutor()
      Returns the Executor which is used to execute the status update sequentially.