public abstract class OperationResponse extends SessionResponse
All operation responses are sent with a result() and the index() (or index) of the state
machine at the point at which the operation was evaluated. The version allows clients to ensure state progresses
monotonically when switching servers by providing the state machine version in future operation requests.
| Modifier and Type | Class and Description |
|---|---|
static class |
OperationResponse.Builder<T extends OperationResponse.Builder<T,U>,U extends OperationResponse>
Operation response builder.
|
RaftResponse.Status| Constructor and Description |
|---|
OperationResponse(RaftResponse.Status status,
RaftError error,
long index,
long eventIndex,
byte[] result,
long lastSequence) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
long |
eventIndex()
Returns the event index.
|
int |
hashCode() |
long |
index()
Returns the operation index.
|
long |
lastSequenceNumber()
Returns the last in sequence command.
|
byte[] |
result()
Returns the operation result.
|
String |
toString() |
error, statuspublic OperationResponse(RaftResponse.Status status, RaftError error, long index, long eventIndex, byte[] result, long lastSequence)
public long index()
public long eventIndex()
public byte[] result()
public long lastSequenceNumber()
This argument is only populated if the command request failed.
public int hashCode()
hashCode in class AbstractRaftResponsepublic boolean equals(Object object)
equals in class AbstractRaftResponsepublic String toString()
toString in class AbstractRaftResponseCopyright © 2013–2017. All rights reserved.