public static class VoteResponse.Builder extends AbstractResponse.Builder<VoteResponse.Builder,VoteResponse>
| Modifier and Type | Method and Description |
|---|---|
VoteResponse |
build() |
boolean |
equals(Object object) |
int |
hashCode() |
String |
toString() |
VoteResponse.Builder |
withTerm(long term)
Sets the response term.
|
VoteResponse.Builder |
withVoted(boolean voted)
Sets whether the vote was granted.
|
withError, withStatuspublic VoteResponse.Builder withTerm(long term)
term - The response term.IllegalArgumentException - if term is negativepublic VoteResponse.Builder withVoted(boolean voted)
voted - Whether the vote was granted.public VoteResponse build()
build in class AbstractResponse.Builder<VoteResponse.Builder,VoteResponse>IllegalStateException - if term is negativeCopyright © 2013–2015. All rights reserved.