Class ServerStatusManager
java.lang.Object
com.linecorp.centraldogma.server.management.ServerStatusManager
Manages the server status.
-
Constructor Summary
ConstructorDescriptionServerStatusManager
(File dataDir) Creates a new instance with the specifieddataDir
. -
Method Summary
Modifier and TypeMethodDescriptionReturns theExecutor
which is used to execute the status update sequentially.Reads theServerStatus
from the"<data-dir>/server-status.properties"
file.void
updateStatus
(ServerStatus newServerStatus) Updates the server status with the specifiedwritable
andreplicating
values.
-
Constructor Details
-
ServerStatusManager
Creates a new instance with the specifieddataDir
.
-
-
Method Details
-
serverStatus
Reads theServerStatus
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
Updates the server status with the specifiedwritable
andreplicating
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
Returns theExecutor
which is used to execute the status update sequentially.
-