Class ClusterStatus
java.lang.Object
org.eclipse.ditto.internal.utils.health.cluster.ClusterStatus
- All Implemented Interfaces:
org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
@Immutable
public final class ClusterStatus
extends Object
implements org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
Holds the status of the pekko cluster.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable
org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.ditto.json.JsonFieldDefinition<String>JSON value of the leaders address.static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray>JSON array with all roles this cluster node has.static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray>JSON array of reachable members.static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonObject>JSON object with the cluster roles and their status.static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray>JSON array of all addresses of members which have seen this cluster state.static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray>JSON array of unreachable members. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the optional leader.Returns a list of the roles this member has.Returns a list of all reachable members.getRoles()Returns the status of each cluster roles members.Returns a list of all members that have seen this cluster state.Returns a list of all unreachable members.inthashCode()static ClusterStatusof(Set<String> reachable, Set<String> unreachable, Set<String> seenBy, String leader, Set<String> ownRoles, Set<ClusterRoleStatus> roles) Returns a newClusterStatusinstance with the given parameters.org.eclipse.ditto.json.JsonObjecttoJson()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable
getImplementedSchemaVersion, getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonString
-
Field Details
-
JSON_KEY_REACHABLE
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> JSON_KEY_REACHABLEJSON array of reachable members. -
JSON_KEY_UNREACHABLE
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> JSON_KEY_UNREACHABLEJSON array of unreachable members. -
JSON_KEY_SEEN_BY
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> JSON_KEY_SEEN_BYJSON array of all addresses of members which have seen this cluster state. -
JSON_KEY_LEADER
JSON value of the leaders address. -
JSON_KEY_OWN_ROLES
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> JSON_KEY_OWN_ROLESJSON array with all roles this cluster node has. -
JSON_KEY_ROLES
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonObject> JSON_KEY_ROLESJSON object with the cluster roles and their status.
-
-
Method Details
-
of
public static ClusterStatus of(Set<String> reachable, Set<String> unreachable, Set<String> seenBy, String leader, Set<String> ownRoles, Set<ClusterRoleStatus> roles) Returns a newClusterStatusinstance with the given parameters.- Parameters:
reachable- a list of all reachable members.unreachable- a list of all unreachable members.seenBy- a list of all members that have seen this cluster state.leader- the leader.ownRoles- a list of all roles this member has.roles- the status of each cluster roles members.- Returns:
- the ClusterState instance.
-
getReachable
Returns a list of all reachable members.- Returns:
- a list of all reachable members.
-
getUnreachable
Returns a list of all unreachable members.- Returns:
- a list of all unreachable members.
-
getSeenBy
Returns a list of all members that have seen this cluster state.- Returns:
- a list of all members that have seen this cluster state.
-
getLeader
Returns the optional leader.- Returns:
- the leader or an empty optional.
-
getOwnRoles
Returns a list of the roles this member has.- Returns:
- a list of the roles this member has.
-
getRoles
Returns the status of each cluster roles members.- Returns:
- the status of each cluster roles members.
-
toJson
public org.eclipse.ditto.json.JsonObject toJson()- Specified by:
toJsonin interfaceorg.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
-
equals
-
hashCode
public int hashCode() -
toString
-