public abstract class AbstractServer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractServer.ServerState
The server state.
|
Constructor and Description |
---|
AbstractServer() |
Modifier and Type | Method and Description |
---|---|
abstract ExecutorService |
getExecutor() |
abstract CorfuMsgHandler |
getHandler()
Get the message handler for this instance.
|
AbstractServer.ServerState |
getState() |
void |
handleMessage(CorfuMsg msg,
io.netty.channel.ChannelHandlerContext ctx,
IServerRouter r)
Handle a incoming Netty message.
|
abstract boolean |
isServerReadyToHandleMsg(CorfuMsg msg) |
void |
sealServerWithEpoch(long epoch)
Seal the server with the epoch.
|
protected void |
setState(AbstractServer.ServerState newState) |
void |
shutdown()
Shutdown the server.
|
public abstract CorfuMsgHandler getHandler()
public void sealServerWithEpoch(long epoch)
epoch
- Epoch to seal withpublic abstract boolean isServerReadyToHandleMsg(CorfuMsg msg)
public void handleMessage(CorfuMsg msg, io.netty.channel.ChannelHandlerContext ctx, IServerRouter r)
msg
- An incoming message.ctx
- The channel handler context.r
- The router that took in the message.protected void setState(AbstractServer.ServerState newState)
public AbstractServer.ServerState getState()
public abstract ExecutorService getExecutor()
public void shutdown()
Copyright © 2019 CorfuDB. All rights reserved.