public static class AppendResponse.Builder extends AbstractResponse.Builder<AppendResponse.Builder,AppendResponse>
| Modifier and Type | Method and Description |
|---|---|
AppendResponse |
build() |
boolean |
equals(Object object) |
int |
hashCode() |
String |
toString() |
AppendResponse.Builder |
withLogIndex(long index)
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.
|
withError, withStatuspublic 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 withLogIndex(long index)
index - The last index of the replica's log.IllegalArgumentException - if index is negativepublic AppendResponse build()
build in class AbstractResponse.Builder<AppendResponse.Builder,AppendResponse>IllegalStateException - if status is ok and term is not positive or log index is negativeCopyright © 2013–2015. All rights reserved.