public class NodeInfo extends Object
Will be obtained through Cluster
by calling the members NodeInfoService
.
Constructor and Description |
---|
NodeInfo() |
Modifier and Type | Method and Description |
---|---|
sirius.kernel.health.metrics.MetricState |
getClusterState()
Returns the state of the cluster as seen by this node.
|
String |
getEndpoint()
Returns the endpoint of the node.
|
LocalDateTime |
getLastPing()
Returns the timestamp of the last successful call to obtain the node state.
|
List<sirius.kernel.health.metrics.Metric> |
getMetrics()
Returns all metrics known for this node.
|
String |
getName()
Returns the name of the node.
|
sirius.kernel.health.metrics.MetricState |
getNodeState()
Returns the state of the node.
|
int |
getPingFailures()
Returns the number of failed attempts to connect to the node.
|
int |
getPriority()
Returns the priority of the node within the cluster (lower is better).
|
String |
getUptime()
Returns the uptime of the node as a string.
|
void |
incPingFailures()
Increment the ping failure counter.
|
protected void |
pingSucceeded()
Resets the ping failure counter and sets the lastPing value to now
|
protected void |
setClusterState(sirius.kernel.health.metrics.MetricState clusterState)
Sets the state of the cluster as seen by this node.
|
protected void |
setEndpoint(String endpoint)
Sets the endpoint of the node.
|
protected void |
setName(String name)
Sets the name of the node
|
protected void |
setNodeState(sirius.kernel.health.metrics.MetricState nodeState)
Sets the state of the node.
|
protected void |
setPriority(int priority)
Sets the priority of the node.
|
protected void |
setUptime(String uptime)
Sets the uptime of the node.
|
public String getName()
protected void setName(String name)
name
- the name to setpublic int getPriority()
protected void setPriority(int priority)
priority
- the priority to setpublic String getEndpoint()
protected void setEndpoint(String endpoint)
endpoint
- the endpoint to set. Should be something like "http://host:port"public LocalDateTime getLastPing()
protected void pingSucceeded()
public sirius.kernel.health.metrics.MetricState getNodeState()
protected void setNodeState(sirius.kernel.health.metrics.MetricState nodeState)
nodeState
- the new node statepublic sirius.kernel.health.metrics.MetricState getClusterState()
protected void setClusterState(sirius.kernel.health.metrics.MetricState clusterState)
clusterState
- the new cluster statepublic List<sirius.kernel.health.metrics.Metric> getMetrics()
public int getPingFailures()
public void incPingFailures()
public String getUptime()
protected void setUptime(String uptime)
uptime
- the uptime to setCopyright © 2018. All rights reserved.