Class ServerStatusManager
java.lang.Object
com.linecorp.centraldogma.server.management.ServerStatusManager
Manages the server status.
-
Constructor Summary
ConstructorsConstructorDescriptionServerStatusManager(File dataDir) Creates a new instance with the specifieddataDir. -
Method Summary
Modifier and TypeMethodDescriptionReturns theExecutorwhich is used to execute the status update sequentially.Reads theServerStatusfrom the"<data-dir>/server-status.properties"file.voidupdateStatus(ServerStatus newServerStatus) Updates the server status with the specifiedwritableandreplicatingvalues.
-
Constructor Details
-
ServerStatusManager
Creates a new instance with the specifieddataDir.
-
-
Method Details
-
serverStatus
Reads theServerStatusfrom the"<data-dir>/server-status.properties"file.The stored
ServerStatusmay be used to determine whether the server is writable and replicating when the server is started. -
updateStatus
Updates the server status with the specifiedwritableandreplicatingvalues.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
Returns theExecutorwhich is used to execute the status update sequentially.
-