public static class AppendResponse.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
AppendResponse |
build() |
AppendResponse.Builder |
withLastLogIndex(long lastLogIndex)
Sets the last index of the replica's log.
|
AppendResponse.Builder |
withSucceeded(boolean succeeded)
Sets whether the request succeeded.
|
AppendResponse.Builder |
withTerm(long term)
Sets the response term.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitwithError, withErrorpublic AppendResponse.Builder withTerm(long term)
term - The response term.IllegalArgumentException - if term is not positivepublic AppendResponse.Builder withSucceeded(boolean succeeded)
succeeded - Whether the append request succeeded.public AppendResponse.Builder withLastLogIndex(long lastLogIndex)
lastLogIndex - The last index of the replica's log.IllegalArgumentException - if index is negativepublic AppendResponse build()
IllegalStateException - if status is ok and term is not positive or log index is negativeCopyright © 2013–2017. All rights reserved.