aboutsummaryrefslogtreecommitdiffstats
path: root/jrt
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-11-11 14:50:02 +0000
committerArne H Juul <arnej@yahooinc.com>2021-11-11 14:50:20 +0000
commitdee05fc3a8975b22fcb4f96454da869eeb8e93f9 (patch)
tree0ae2acd46307bd496a65688655980991a2dc7ea2 /jrt
parentb91142792f9fda86eeb0b2c40337df6a0aa2c905 (diff)
add some information while waiting for messagebus network
Diffstat (limited to 'jrt')
-rw-r--r--jrt/src/com/yahoo/jrt/slobrok/api/Mirror.java12
1 files changed, 11 insertions, 1 deletions
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<Entry[]> 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);
+ }
}