private void startChild() { LogUtil.enhanceLogWithCustomField(log, BaseClientData.MDC_CONNECTION_ID, connectionId); if (child == null) { log.debug("Starting persistence actor for Connection with ID '{}'", connectionId); final ActorRef childRef = getContext().actorOf(persistenceActorProps, "pa"); child = getContext().watch(childRef); } }
private void startChild() { LogUtil.enhanceLogWithCustomField(log, BaseClientData.MDC_CONNECTION_ID, connectionId); if (child == null) { log.debug("Starting persistence actor for Connection with ID '{}'", connectionId); final ActorRef childRef = getContext().actorOf(persistenceActorProps, "pa"); child = getContext().watch(childRef); } }
child = null; final Duration restartDelay = calculateRestartDelay(); getContext().system().scheduler() .scheduleOnce(new FiniteDuration(restartDelay.toNanos(), TimeUnit.NANOSECONDS), getSelf(), StartChild.getInstance(), getContext().dispatcher(), null); restartCount += 1; }) log.debug("Forwarding <{}> message to child {}.", message.getClass().getSimpleName(), child.path()); child.forward(message, getContext());
child = null; final Duration restartDelay = calculateRestartDelay(); getContext().system().scheduler() .scheduleOnce(new FiniteDuration(restartDelay.toNanos(), TimeUnit.NANOSECONDS), getSelf(), StartChild.getInstance(), getContext().dispatcher(), null); restartCount += 1; }) log.debug("Forwarding <{}> message to child {}.", message.getClass().getSimpleName(), child.path()); child.forward(message, getContext());