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 class
ClusterInteractionRequest.Operation
The operations which can be requested to be performed by the cluster heartbeat.
-
Field Summary
Fields Modifier and Type Field Description protected String
clusterName
The name of the cluster if this is a force lost request for the server within this cluster,null
otherwise.protected String
nodeName
The name of the server node if this is a force lost request,null
otherwise.protected ClusterInteractionRequest.Operation
operation
The operation which to perform by the cluster heartbeat.protected long
runningSince
The time since when the server node to be forcibly lost has been running since,Long.MIN_VALUE
otherwise.
-
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 String
getClusterName()
Gets the name of the cluster if this is a force lost request for the server within this cluster,null
otherwise.String
getNodeName()
Gets the name of the server node if this is a force lost request,null
otherwise.ClusterInteractionRequest.Operation
getOperation()
Gets the operation which to perform by the cluster heartbeat.long
getRunningSince()
Gets the time since when the server node to be forcibly lost has been running since,Long.MIN_VALUE
otherwise.
-
-
-
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,null
otherwise.
-
nodeName
protected final String nodeName
The name of the server node if this is a force lost request,null
otherwise.
-
runningSince
protected final long runningSince
The time since when the server node to be forcibly lost has been running since,Long.MIN_VALUE
otherwise.
-
-
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,null
otherwise.- Returns:
- The name of the cluster if this is a force lost request for the
server within this cluster,
null
otherwise.
-
getNodeName
public String getNodeName()
Gets the name of the server node if this is a force lost request,null
otherwise.- Returns:
- The name of the server node if this is a force lost request,
null
otherwise.
-
getRunningSince
public long getRunningSince()
Gets the time since when the server node to be forcibly lost has been running since,Long.MIN_VALUE
otherwise.- Returns:
- The time since when the server node to be forcibly lost has been
running since,
Long.MIN_VALUE
otherwise.
-
-