Remove final mutable state from NodeStatus
private final Duration heartbeatPeriod;
private final String version;
private final Map<String, String> osInfo;
- private long touched = System.currentTimeMillis();
public NodeStatus(
NodeId nodeId,
@@ -177,14 +176,6 @@ public String getVersion() {
return osInfo;
}
- public long getTouched() {
- return touched;
- }
-
- public void setTouched(long touched) {
- this.touched = touched;
- }
-
public float getLoad() {
float inUse = slots.parallelStream()
.filter(slot -> slot.getSession() != null)
@@ -201,10 +192,6 @@ public long getLastSessionCreated() {
.orElse(0);
}
- public void touch() {
- touched = System.currentTimeMillis();
- }
-
@Override
public boolean equals(Object o) {
if (!(o instanceof NodeStatus)) {
