public static class RaftServer.Builder extends Object
RaftServer objects.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
RaftServer |
build() |
RaftServer.Builder |
setGroup(RaftGroup group)
Set all the peers (including the server being built) in the Raft cluster.
|
RaftServer.Builder |
setParameters(Parameters parameters)
Set
Parameters. |
RaftServer.Builder |
setProperties(RaftProperties properties)
Set
RaftProperties. |
RaftServer.Builder |
setServerId(RaftPeerId serverId)
Set the server ID.
|
RaftServer.Builder |
setStateMachine(StateMachine stateMachine)
Set the
StateMachine of the server. |
RaftServer.Builder |
setStateMachineRegistry(StateMachine.Registry stateMachineRegistry)
Set the
StateMachine.Registry of the server. |
public RaftServer build() throws IOException
RaftServer object.IOExceptionpublic RaftServer.Builder setServerId(RaftPeerId serverId)
public RaftServer.Builder setStateMachine(StateMachine stateMachine)
StateMachine of the server.public RaftServer.Builder setStateMachineRegistry(StateMachine.Registry stateMachineRegistry)
StateMachine.Registry of the server.public RaftServer.Builder setGroup(RaftGroup group)
public RaftServer.Builder setProperties(RaftProperties properties)
RaftProperties.public RaftServer.Builder setParameters(Parameters parameters)
Parameters.Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.