Class ClusterInteractionRequest
- java.lang.Object
-
- de.aristaflow.adept2.core.registry.cluster.ClusterInteractionRequest
-
public class ClusterInteractionRequest extends Object
Requests to the cluster heartbeat, that is, signals to the cluster database. If this is a request to force the server on a different node to be lost, the cluster name, node name and the running since time from the corresponding server will be provided within the request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusterInteractionRequest.OperationThe operations which can be requested to be performed by the cluster heartbeat.
-
Field Summary
Fields Modifier and Type Field Description protected StringclusterNameThe name of the cluster if this is a force lost request for the server within this cluster,nullotherwise.protected StringnodeNameThe name of the server node if this is a force lost request,nullotherwise.protected ClusterInteractionRequest.OperationoperationThe operation which to perform by the cluster heartbeat.protected longrunningSinceThe time since when the server node to be forcibly lost has been running since,Long.MIN_VALUEotherwise.
-
Constructor Summary
Constructors Constructor Description ClusterInteractionRequest(ClusterInteractionRequest.Operation operation)Creates a new request with the designated operation.ClusterInteractionRequest(String clusterName, String nodeName, long runningSince)Creates a new force lost request for the designated (different) server node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClusterName()Gets the name of the cluster if this is a force lost request for the server within this cluster,nullotherwise.StringgetNodeName()Gets the name of the server node if this is a force lost request,nullotherwise.ClusterInteractionRequest.OperationgetOperation()Gets the operation which to perform by the cluster heartbeat.longgetRunningSince()Gets the time since when the server node to be forcibly lost has been running since,Long.MIN_VALUEotherwise.
-
-
-
Field Detail
-
operation
protected final ClusterInteractionRequest.Operation operation
The operation which to perform by the cluster heartbeat.
-
clusterName
protected final String clusterName
The name of the cluster if this is a force lost request for the server within this cluster,nullotherwise.
-
nodeName
protected final String nodeName
The name of the server node if this is a force lost request,nullotherwise.
-
runningSince
protected final long runningSince
The time since when the server node to be forcibly lost has been running since,Long.MIN_VALUEotherwise.
-
-
Constructor Detail
-
ClusterInteractionRequest
public ClusterInteractionRequest(ClusterInteractionRequest.Operation operation)
Creates a new request with the designated operation.- Parameters:
operation- The operation which to perform by the cluster heartbeat.
-
ClusterInteractionRequest
public ClusterInteractionRequest(String clusterName, String nodeName, long runningSince)
Creates a new force lost request for the designated (different) server node.- Parameters:
clusterName- The name of the cluster of the server node to request a force lost of.nodeName- The name of the server node to request a force lost of.runningSince- The time since when the server node has been running.
-
-
Method Detail
-
getOperation
public ClusterInteractionRequest.Operation getOperation()
Gets the operation which to perform by the cluster heartbeat.- Returns:
- The operation which to perform by the cluster heartbeat.
-
getClusterName
public String getClusterName()
Gets the name of the cluster if this is a force lost request for the server within this cluster,nullotherwise.- Returns:
- The name of the cluster if this is a force lost request for the
server within this cluster,
nullotherwise.
-
getNodeName
public String getNodeName()
Gets the name of the server node if this is a force lost request,nullotherwise.- Returns:
- The name of the server node if this is a force lost request,
nullotherwise.
-
getRunningSince
public long getRunningSince()
Gets the time since when the server node to be forcibly lost has been running since,Long.MIN_VALUEotherwise.- Returns:
- The time since when the server node to be forcibly lost has been
running since,
Long.MIN_VALUEotherwise.
-
-