Skip to content

Commit abce1cd

Browse files
committed
Remove duplicate accessor method
1 parent 45bd6ac commit abce1cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/server/src/org/openqa/selenium/grid/distributor/gridmodel/local/LocalGridModel.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public LocalGridModel(EventBus events) {
6767

6868
public static GridModel create(Config config) {
6969
EventBus bus = new EventBusOptions(config).getEventBus();
70-
70+
7171
return new LocalGridModel(bus);
7272
}
7373

@@ -168,13 +168,13 @@ public void purgeDeadNodes() {
168168
writeLock.lock();
169169
try {
170170
Set<NodeStatus> lost = nodes(UP).stream()
171-
.filter(status -> now - status.touched() > status.heartbeatPeriod().toMillis() * 2)
171+
.filter(status -> now - status.touched() > status.getHeartbeatPeriod().toMillis() * 2)
172172
.collect(toSet());
173173
Set<NodeStatus> resurrected = nodes(DOWN).stream()
174-
.filter(status -> now - status.touched() <= status.heartbeatPeriod().toMillis())
174+
.filter(status -> now - status.touched() <= status.getHeartbeatPeriod().toMillis())
175175
.collect(toSet());
176176
Set<NodeStatus> dead = nodes(DOWN).stream()
177-
.filter(status -> now - status.touched() > status.heartbeatPeriod().toMillis() * 4)
177+
.filter(status -> now - status.touched() > status.getHeartbeatPeriod().toMillis() * 4)
178178
.collect(toSet());
179179
if (lost.size() > 0) {
180180
LOG.info(String.format(
@@ -319,7 +319,7 @@ public NodeStatus rewrite(NodeStatus status, Availability availability) {
319319
status.getMaxSessionCount(),
320320
status.getSlots(),
321321
availability,
322-
status.heartbeatPeriod(),
322+
status.getHeartbeatPeriod(),
323323
status.getVersion(),
324324
status.getOsInfo());
325325
}
@@ -435,7 +435,7 @@ public void amend(Availability availability, NodeStatus status, Slot slot) {
435435
status.getMaxSessionCount(),
436436
newSlots,
437437
status.getAvailability(),
438-
status.heartbeatPeriod(),
438+
status.getHeartbeatPeriod(),
439439
status.getVersion(),
440440
status.getOsInfo()));
441441
}

0 commit comments

Comments
 (0)