default ExecutionContext executionContext() { return actorSystem().dispatcher(); }
default ExecutionContext executionContext() { return actorSystem().dispatcher(); }
default ExecutionContext executionContext() { return actorSystem().dispatcher(); }
futures, getContext().system().dispatcher()); return new OrderHistory(order, address); }, getContext().system().dispatcher()); pipe(aggResult, getContext().system().dispatcher()).to( orderAggregateActor);
/** * Wait and retry. */ public void waitAndRetry() { ContinueToSendToBatchSenderAsstManager continueToSendToBatchSenderAsstManager = new ContinueToSendToBatchSenderAsstManager( processedWorkerCount); logger.debug("NOW WAIT Another " + asstManagerRetryIntervalMillis + " MS. at " + PcDateUtils.getNowDateTimeStrStandard()); getContext() .system() .scheduler() .scheduleOnce( Duration.create(asstManagerRetryIntervalMillis, TimeUnit.MILLISECONDS), getSelf(), continueToSendToBatchSenderAsstManager, getContext().system().dispatcher(), getSelf()); return; }
.scheduleOnce(timeOutDuration, getSelf(), ExecutionManagerMsgType.OPERATION_TIMEOUT, getContext().system().dispatcher(), getSelf());
/** * * 201412: now consider the poller. With poller, will cancel this future * task and reschedule */ private void cancelExistingIfAnyAndScheduleTimeoutCall() { // To handle cases where this operation takes extremely long, schedule a // 'timeout' message to be sent to us if (timeoutMessageCancellable != null && !timeoutMessageCancellable.isCancelled()) { timeoutMessageCancellable.cancel(); } // now reschedule timeoutMessageCancellable = getContext() .system() .scheduler() .scheduleOnce(timeoutDuration, getSelf(), OperationWorkerMsgType.OPERATION_TIMEOUT, getContext().system().dispatcher(), getSelf()); }
getSelf(), RequestWorkerMsgType.PROCESS_ON_TIMEOUT, getContext().system().dispatcher(), getSelf()); getSelf()); }, getContext().system().dispatcher()); getSelf()); }, getContext().system().dispatcher());
getSelf(), RequestWorkerMsgType.PROCESS_ON_TIMEOUT, getContext().system().dispatcher(), getSelf()); getSelf()); }, getContext().system().dispatcher()); getSelf()); }, getContext().system().dispatcher());
TimeUnit.MILLISECONDS), getSelf(), OperationWorkerMsgType.POLL_PROGRESS, getContext().system().dispatcher(), getSelf());
getSelf(), RequestWorkerMsgType.PROCESS_ON_TIMEOUT, getContext().system().dispatcher(), getSelf());
getSelf(), RequestWorkerMsgType.PROCESS_ON_TIMEOUT, getContext().system().dispatcher(), getSelf());
getSelf(), RequestWorkerMsgType.PROCESS_ON_TIMEOUT, getContext().system().dispatcher(), getSelf()); } else {
@Override public <T> Future<T> execute(Callable<T> callable) { scala.concurrent.Future<T> scalaFuture = Futures.future(callable, actorSystem.dispatcher()); return new FlinkFuture<>(scalaFuture); }
private Cancellable internalSchedule(Runnable runnable, long delay, TimeUnit unit) { return actorSystem.scheduler().scheduleOnce( new FiniteDuration(delay, unit), runnable, actorSystem.dispatcher()); }
private Cancellable internalSchedule(Runnable runnable, long delay, TimeUnit unit) { return actorSystem.scheduler().scheduleOnce( new FiniteDuration(delay, unit), runnable, actorSystem.dispatcher()); }
TimedRunnable(FiniteDuration timeout, RaftActor actor) { Preconditions.checkNotNull(timeout); Preconditions.checkNotNull(actor); cancelTimer = actor.getContext().system().scheduler().scheduleOnce(timeout, actor.self(), new Runnable() { @Override public void run() { cancel(); } }, actor.getContext().system().dispatcher(), actor.self()); }
private void scheduleRegistrationListener(FiniteDuration interval) { LOG.debug("--->scheduleRegistrationListener called."); registrationSchedule = getContext().system().scheduler().schedule( interval, interval, getSelf(), new RegisterListener(), getContext().system().dispatcher(), getSelf()); }
private void scheduleShutdown() { shutdown = getContext().system() .scheduler() .scheduleOnce(Duration.create(SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS), () -> { if (null != getContext()) { getContext().stop(getSelf()); } }, getContext().system().dispatcher()); }
private void scheduleInternalRetrieveHotEntities() { initHotMetrics(); getContext().getSystem() .scheduler() .schedule(FiniteDuration.apply(WAIT_TIME_MS, TimeUnit.MILLISECONDS), FiniteDuration.apply(SCHEDULE_INTERNAL_RETRIEVE_COMMAND, TimeUnit.MILLISECONDS), getSelf(), InternalRetrieveStatistics.newInstance(), getContext().getSystem().dispatcher(), ActorRef.noSender()); }