public final class Context extends Object implements Closeable
| 构造器和说明 |
|---|
Context(PrintStream printStream)
Build a context.
|
Context(PrintStream printStream,
boolean cli,
RetryPolicy retryPolicy,
RaftProperties properties,
Parameters parameters) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
Parameters |
getParameters() |
PrintStream |
getPrintStream() |
RaftProperties |
getProperties() |
RetryPolicy |
getRetryPolicy() |
boolean |
isCli()
Is this from CLI?
|
RaftClient |
newRaftClient(RaftGroup group)
Create a new
RaftClient from the given group. |
public Context(PrintStream printStream)
printStream - the print streampublic Context(PrintStream printStream, boolean cli, RetryPolicy retryPolicy, RaftProperties properties, Parameters parameters)
public PrintStream getPrintStream()
public boolean isCli()
public RetryPolicy getRetryPolicy()
public RaftProperties getProperties()
public Parameters getParameters()
public RaftClient newRaftClient(RaftGroup group)
RaftClient from the given group.public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2017–2025 The Apache Software Foundation. All rights reserved.