public static class PollRequest.Builder extends AbstractRequest.Builder<PollRequest.Builder,PollRequest>
| Modifier and Type | Method and Description |
|---|---|
PollRequest |
build() |
boolean |
equals(Object object) |
int |
hashCode() |
String |
toString() |
PollRequest.Builder |
withCandidate(int candidate)
Sets the request leader.
|
PollRequest.Builder |
withLogIndex(long index)
Sets the request last log index.
|
PollRequest.Builder |
withLogTerm(long term)
Sets the request last log term.
|
PollRequest.Builder |
withTerm(long term)
Sets the request term.
|
public PollRequest.Builder withTerm(long term)
term - The request term.IllegalArgumentException - if term is negativepublic PollRequest.Builder withCandidate(int candidate)
candidate - The request candidate.IllegalArgumentException - if candidate is not positivepublic PollRequest.Builder withLogIndex(long index)
index - The request last log index.IllegalArgumentException - if index is negativepublic PollRequest.Builder withLogTerm(long term)
term - The request last log term.IllegalArgumentException - if term is negativepublic PollRequest build()
build in class AbstractRequest.Builder<PollRequest.Builder,PollRequest>IllegalStateException - if candidate is not positive or if term, logIndex or logTerm are negativeCopyright © 2013–2015. All rights reserved.