public class PublishRequest extends SessionRequest
Publish requests are used by servers to publish event messages to clients. Event messages are
sequenced based on the point in the Raft log at which they were published to the client. The
eventIndex() indicates the index at which the event was sent, and the previousIndex()
indicates the index of the prior event messages sent to the client. Clients must ensure that event
messages are received in sequence by tracking the last index for which they received an event message
and validating previousIndex() against that index.
| Modifier and Type | Class and Description |
|---|---|
static class |
PublishRequest.Builder
Publish request builder.
|
| Constructor and Description |
|---|
PublishRequest(long session,
long eventIndex,
long previousIndex,
List<RaftEvent> events) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
long |
eventIndex()
Returns the event index.
|
List<RaftEvent> |
events()
Returns the request events.
|
int |
hashCode() |
static PublishRequest.Builder |
newBuilder()
Returns a new publish request builder.
|
long |
previousIndex()
Returns the previous event index.
|
String |
toString() |
sessionpublic static PublishRequest.Builder newBuilder()
public long eventIndex()
public long previousIndex()
public int hashCode()
hashCode in class SessionRequestpublic boolean equals(Object object)
equals in class SessionRequestpublic String toString()
toString in class SessionRequestCopyright © 2013–2017. All rights reserved.