- long start = System.nanoTime();
- broker.registerProvider(this);
- for (int i = 0; i < REGISTRATION_TIMEOUT; i++) {
- if (session != null) {
- long stop = System.nanoTime();
- LOG.info("Registered session {} with the MD-SAL after {} ns",
- session,
- stop - start);
- return;
- } else {
- Thread.sleep(1);
- }
- }
- throw new RuntimeException("Session not initiated after " + REGISTRATION_TIMEOUT + " ms");