From dee05fc3a8975b22fcb4f96454da869eeb8e93f9 Mon Sep 17 00:00:00 2001 From: Arne H Juul Date: Thu, 11 Nov 2021 14:50:02 +0000 Subject: add some information while waiting for messagebus network --- jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'jrt') diff --git a/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java b/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java index 47c9c545d29..51a3c6b6146 100644 --- a/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java +++ b/jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java @@ -33,11 +33,12 @@ public class Mirror implements IMirror { private static final Logger log = Logger.getLogger(Mirror.class.getName()); - private final Supervisor orb; + private final Supervisor orb; private final SlobrokList slobroks; private String currSlobrok; private final BackOffPolicy backOff; private volatile int updates = 0; + private volatile long iterations = 0; private boolean requestDone = false; private boolean logOnSuccess = true; private final AtomicReference specs = new AtomicReference<>(new Entry[0]); @@ -169,6 +170,7 @@ public class Mirror implements IMirror { * Invoked by the update task. */ private void checkForUpdate() { + ++iterations; if (requestDone) { handleUpdate(); requestDone = false; @@ -327,4 +329,12 @@ public class Mirror implements IMirror { } + public void dumpState() { + log.log(Level.INFO, "location broker mirror state: " + + " iterations: " + iterations + + ", connected to: " + target + + ", seen " + updates + " updates" + + ", current server: "+ currSlobrok + + ", list of servers: " + slobroks); + } } -- cgit v1.2.3