Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
}
+ /*
+ * Cleanup this handler state meaning put it back to a vanilla state.
+ */
+ public void clear() {
+ this.eventMap.clear();
+ this.logLevelsAll.clear();
+ }
+
@Override
public void close() throws SecurityException {}
}
}
+ /*
+ * Cleanup Agent state.
+ */
+ private void cleanupState() {
+ enabledEventSet.clear();
+ enabledLoggers.clear();
+ if (this.handler != null) {
+ this.handler.clear();
+ }
+ }
+
public void init(LTTngLogHandler handler) throws InterruptedException {
this.handler = handler;
break;
}
+ /* Cleanup Agent state before trying to connect or reconnect. */
+ cleanupState();
+
try {
/*