Java Code Examples for com.alipay.sofa.jraft.error.RaftError#getNumber()

The following examples show how to use com.alipay.sofa.jraft.error.RaftError#getNumber() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExpectClosure.java    From sofa-jraft with Apache License 2.0 4 votes vote down vote up
public ExpectClosure(RaftError expectedErrCode, String expectErrMsg, CountDownLatch latch) {
    super();
    this.expectedErrCode = expectedErrCode.getNumber();
    this.expectErrMsg = expectErrMsg;
    this.latch = latch;
}
 
Example 2
Source File: Status.java    From sofa-jraft with Apache License 2.0 4 votes vote down vote up
public Status(RaftError raftError, String fmt, Object... args) {
    this.state = new State(raftError.getNumber(), String.format(fmt, args));
}
 
Example 3
Source File: Status.java    From sofa-jraft with Apache License 2.0 4 votes vote down vote up
/**
 * Set raft error and error msg.
 */
public void setError(RaftError error, String fmt, Object... args) {
    this.state = new State(error.getNumber(), String.format(String.valueOf(fmt), args));
}
 
Example 4
Source File: ExpectClosure.java    From sofa-jraft with Apache License 2.0 4 votes vote down vote up
public ExpectClosure(RaftError expectedErrCode, String expectErrMsg, CountDownLatch latch) {
    super();
    this.expectedErrCode = expectedErrCode.getNumber();
    this.expectErrMsg = expectErrMsg;
    this.latch = latch;
}