public class KeepAliveResponse extends AbstractRaftResponse
Session keep alive responses are sent upon the completion of a KeepAliveRequest
from a client. Keep alive responses, when successful, provide the current cluster configuration and leader
to the client to ensure clients can evolve with the structure of the cluster and make intelligent decisions
about connecting to the cluster.
| Modifier and Type | Class and Description |
|---|---|
static class |
KeepAliveResponse.Builder
Status response builder.
|
RaftResponse.Status| Constructor and Description |
|---|
KeepAliveResponse(RaftResponse.Status status,
RaftError error,
MemberId leader,
Collection<MemberId> members,
long[] sessionIds) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
int |
hashCode() |
MemberId |
leader()
Returns the cluster leader.
|
Collection<MemberId> |
members()
Returns the cluster members.
|
static KeepAliveResponse.Builder |
newBuilder()
Returns a new keep alive response builder.
|
long[] |
sessionIds()
Returns the sessions that were successfully kept alive.
|
String |
toString() |
error, statuspublic KeepAliveResponse(RaftResponse.Status status, RaftError error, MemberId leader, Collection<MemberId> members, long[] sessionIds)
public static KeepAliveResponse.Builder newBuilder()
public MemberId leader()
public Collection<MemberId> members()
public long[] sessionIds()
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.