public abstract class AbstractRatisCommand extends AbstractCommand
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
GROUPID_OPTION_NAME |
static String |
PEER_OPTION_NAME |
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractRatisCommand(Context context) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected GroupInfoReply |
getGroupInfoReply() |
protected List<RaftPeerId> |
getIds(String[] optionValues,
BiConsumer<RaftPeerId,InetSocketAddress> consumer) |
protected org.apache.ratis.proto.RaftProtos.RaftPeerProto |
getLeader(org.apache.ratis.proto.RaftProtos.RoleInfoProto roleInfo)
Get the leader id.
|
org.apache.commons.cli.Options |
getOptions() |
protected Stream<RaftPeer> |
getPeerStream(org.apache.ratis.proto.RaftProtos.RaftPeerRole role) |
protected RaftGroup |
getRaftGroup() |
protected RaftClient |
newRaftClient() |
protected void |
processReply(RaftClientReply reply,
Supplier<String> messageSupplier) |
int |
run(org.apache.commons.cli.CommandLine cl)
Runs the command.
|
getContext, getPrintStream, printf, printlnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, compareTo, getCommandName, getDescription, getSubCommands, getUsage, hasSubCommand, parseAndValidateArgs, validateArgsprotected AbstractRatisCommand(Context context)
public int run(org.apache.commons.cli.CommandLine cl)
throws IOException
Commandcl - the parsed command line for the argumentsIOExceptionprotected RaftClient newRaftClient()
public org.apache.commons.cli.Options getOptions()
Options of the commandprotected RaftGroup getRaftGroup()
protected GroupInfoReply getGroupInfoReply()
protected org.apache.ratis.proto.RaftProtos.RaftPeerProto getLeader(org.apache.ratis.proto.RaftProtos.RoleInfoProto roleInfo)
roleInfo - the role infoprotected void processReply(RaftClientReply reply, Supplier<String> messageSupplier) throws IOException
IOExceptionprotected List<RaftPeerId> getIds(String[] optionValues, BiConsumer<RaftPeerId,InetSocketAddress> consumer)
protected Stream<RaftPeer> getPeerStream(org.apache.ratis.proto.RaftProtos.RaftPeerRole role)
Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.