public static class AppendRequest.Builder extends AbstractRequest.Builder<AppendRequest.Builder,AppendRequest>
| Modifier and Type | Method and Description |
|---|---|
AppendRequest.Builder |
addEntry(net.kuujo.catalog.server.storage.Entry entry)
Adds an entry to the request.
|
AppendRequest |
build() |
boolean |
equals(Object object) |
int |
hashCode() |
void |
reset() |
String |
toString() |
AppendRequest.Builder |
withCommitIndex(long index)
Sets the request commit index.
|
AppendRequest.Builder |
withEntries(net.kuujo.catalog.server.storage.Entry... entries)
Sets the request entries.
|
AppendRequest.Builder |
withEntries(List<? extends net.kuujo.catalog.server.storage.Entry> entries)
Sets the request entries.
|
AppendRequest.Builder |
withGlobalIndex(long index)
Sets the request global index.
|
AppendRequest.Builder |
withLeader(int leader)
Sets the request leader.
|
AppendRequest.Builder |
withLogIndex(long index)
Sets the request last log index.
|
AppendRequest.Builder |
withLogTerm(long term)
Sets the request last log term.
|
AppendRequest.Builder |
withTerm(long term)
Sets the request term.
|
public void reset()
reset in class AbstractRequest.Builder<AppendRequest.Builder,AppendRequest>public AppendRequest.Builder withTerm(long term)
term - The request term.IllegalArgumentException - if the term is not positivepublic AppendRequest.Builder withLeader(int leader)
leader - The request leader.IllegalArgumentException - if the leader is not positivepublic AppendRequest.Builder withLogIndex(long index)
index - The request last log index.IllegalArgumentException - if the index is not positivepublic AppendRequest.Builder withLogTerm(long term)
term - The request last log term.IllegalArgumentException - if the term is not positivepublic AppendRequest.Builder withEntries(net.kuujo.catalog.server.storage.Entry... entries)
entries - The request entries.NullPointerException - if entries is nullpublic AppendRequest.Builder withEntries(List<? extends net.kuujo.catalog.server.storage.Entry> entries)
entries - The request entries.NullPointerException - if entries is nullpublic AppendRequest.Builder addEntry(net.kuujo.catalog.server.storage.Entry entry)
entry - The entry to add.NullPointerException - if entry is nullpublic AppendRequest.Builder withCommitIndex(long index)
index - The request commit index.IllegalArgumentException - if index is not positivepublic AppendRequest.Builder withGlobalIndex(long index)
index - The global recycle index.IllegalArgumentException - if index is not positivepublic AppendRequest build()
build in class AbstractRequest.Builder<AppendRequest.Builder,AppendRequest>IllegalStateException - if the term, log term, log index, commit index, or global index are not positive, or
if entries is nullCopyright © 2013–2015. All rights reserved.