public void received(Node node, boolean busy) { if (busy) { double wantWeight = node.metrics.weight.get() - 0.01; if (wantWeight < 1.0) { increaseWeights(); node.metrics.weight.set(1.0); } else { node.metrics.weight.set(wantWeight); } node.metrics.busy.inc(1); } }