public class ManagementServer extends AbstractServer
Created by zlokhandwala on 9/28/16.
AbstractServer.ServerState
Constructor and Description |
---|
ManagementServer(ServerContext serverContext)
Returns new ManagementServer.
|
Modifier and Type | Method and Description |
---|---|
ExecutorService |
getExecutor() |
void |
handleFailureDetectedMsg(CorfuPayloadMsg<DetectorMsg> msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Triggers the failure handler.
|
void |
handleFailureDetectorMetricsRequest(CorfuMsg msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r) |
void |
handleHealingDetectedMsg(CorfuPayloadMsg<DetectorMsg> msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Triggers the healing handler.
|
void |
handleLayoutRequest(CorfuMsg msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Handles the Management layout request.
|
void |
handleManagementBootstrap(CorfuPayloadMsg<Layout> msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Bootstraps the management server.
|
void |
handleNodeStateRequest(CorfuMsg msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Returns current
NodeState provided by failure detector. |
void |
handleOrchestratorMsg(CorfuPayloadMsg<OrchestratorMsg> msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Forward an orchestrator request to the orchestrator service.
|
boolean |
isServerReadyToHandleMsg(CorfuMsg msg) |
void |
shutdown()
Management Server shutdown:
Shuts down the fault detector service.
|
getHandler, getState, handleMessage, sealServerWithEpoch, setState
public ManagementServer(ServerContext serverContext)
serverContext
- context object providing parameters and objectspublic boolean isServerReadyToHandleMsg(CorfuMsg msg)
isServerReadyToHandleMsg
in class AbstractServer
public ExecutorService getExecutor()
getExecutor
in class AbstractServer
public void handleOrchestratorMsg(@Nonnull CorfuPayloadMsg<OrchestratorMsg> msg, @Nonnull io.netty.channel.ChannelHandlerContext ctx, @Nonnull IServerRouter r)
msg
- corfu message containing ORCHESTRATOR_REQUESTctx
- netty ChannelHandlerContextr
- server routerpublic void handleManagementBootstrap(CorfuPayloadMsg<Layout> msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
msg
- corfu message containing MANAGEMENT_BOOTSTRAP_REQUESTctx
- netty ChannelHandlerContextr
- server routerpublic void handleFailureDetectedMsg(CorfuPayloadMsg<DetectorMsg> msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
msg
- corfu message containing MANAGEMENT_FAILURE_DETECTEDctx
- netty ChannelHandlerContextr
- server routerpublic void handleHealingDetectedMsg(CorfuPayloadMsg<DetectorMsg> msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
msg
- corfu message containing MANAGEMENT_HEALING_DETECTEDctx
- netty ChannelHandlerContextr
- server routerpublic void handleNodeStateRequest(CorfuMsg msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
NodeState
provided by failure detector.
The detector periodically collects current cluster state and saves it in ClusterStateContext
.
Servers periodically inspect cluster and ask each other of the connectivity/node state
(connection status between current node and all the others).
The node provides its current node state.
Default NodeState has been providing unless the node is not bootstrapped.
Failure detector updates ClusterNodeState by current state then current NodeState can be provided to other nodes.msg
- corfu message containing NODE_STATE_REQUESTctx
- netty ChannelHandlerContextr
- server routerpublic void handleFailureDetectorMetricsRequest(CorfuMsg msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
public void handleLayoutRequest(CorfuMsg msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
msg
- corfu message containing MANAGEMENT_LAYOUT_REQUESTctx
- netty ChannelHandlerContextr
- server routerpublic void shutdown()
shutdown
in class AbstractServer
Copyright © 2019 CorfuDB. All rights reserved.