/** * Cancel cancellable. */ public void cancelCancellable() { if (timeoutMessageCancellable != null) { timeoutMessageCancellable.cancel(); } }
/** * Cancel cancellable. */ private final void cancelCancellable() { if (timeoutMessageCancellable != null && !timeoutMessageCancellable.isCancelled()) { timeoutMessageCancellable.cancel(); } if (pollMessageCancellable != null && !pollMessageCancellable.isCancelled()) { pollMessageCancellable.cancel(); } }
private void populateRegistry(String memberName) { String notifier = new StringBuilder().append(NOTIFIER_AKKA_URL).append(memberName) .append("/").append(memberName).append("-notifier").toString(); if (!notifierRegistrationStatus.containsKey(notifier)) { notifierRegistrationStatus.put(notifier, false); } if (!registrationSchedule.isCancelled()) { scheduleRegistrationListener(SCHEDULER_DURATION); } }
private void populateRegistry(String memberName) { for (String shard: shardsToMonitor) { String notifier =(new StringBuilder()).append(NOTIFIER_AKKA_URL).append(memberName) .append("/").append(memberName).append("-notifier").toString(); if (!notifierRegistrationStatus.containsKey(notifier)) { notifierRegistrationStatus.put(notifier, false); } } if (!registrationSchedule.isCancelled()) { scheduleRegistrationListener(schedulerDuration); } }
/** * Cancel cancellable. */ public void cancelCancellable() { if (timeoutMessageCancellable != null) { timeoutMessageCancellable.cancel(); } }
/** * * 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()); }
@Override public void aroundPostRestart(Throwable reason) { super.aroundPostRestart(reason); if(cancellable == null || cancellable.isCancelled()){ cancellable = startScheduledAwake(); } }
/** * Cancel cancellable. */ public void cancelCancellable() { // responseFuture: to cancel the future.boolean cancelResponseFuture // if (cancelResponseFuture && responseFuture != null && // !responseFuture.isDone()) { // responseFuture.cancel(true); // } if (timeoutMessageCancellable != null) { timeoutMessageCancellable.cancel(); } }
private void stopHeartBeat() { if (heartbeatSchedule != null && !heartbeatSchedule.isCancelled()) { heartbeatSchedule.cancel(); } }
/** * Cancel cancellable. */ public void cancelCancellable() { if (timeoutMessageCancellable != null) { timeoutMessageCancellable.cancel(); } if (getResponseFuture() != null && !getResponseFuture().isDone()) { getResponseFuture().cancel(true); } }
/** * stop the scheduled election */ protected void stopElection() { if (electionCancel != null && !electionCancel.isCancelled()) { electionCancel.cancel(); } }
/** * Cancel cancellable. */ public void cancelCancellable() { if (timeoutMessageCancellable != null) { timeoutMessageCancellable.cancel(); } if (getResponseFuture() != null && !getResponseFuture().isDone()) { getResponseFuture().cancel(true); } }
@Override public void postStop() { if (scheduler != null && !scheduler.isCancelled()) { scheduler.cancel(); scheduler = null; } }
timeoutMessageCancellable.cancel();
@Override public void postStop() { if (scheduler != null && !scheduler.isCancelled()) { scheduler.cancel(); scheduler = null; } }
/** * Cancel cancellable. */ public void cancelCancellable() { if (timeoutMessageCancellable != null) { timeoutMessageCancellable.cancel(); } }
/** * Cancel cancellable. */ private final void cancelCancellable() { if (timeoutMessageCancellable != null && !timeoutMessageCancellable.isCancelled()) { timeoutMessageCancellable.cancel(); } if (pollMessageCancellable != null && !pollMessageCancellable.isCancelled()) { pollMessageCancellable.cancel(); } }
private void cancelStopSelfIfDeletedTrigger() { if (stopSelfIfDeletedTrigger != null) { stopSelfIfDeletedTrigger.cancel(); stopSelfIfDeletedTrigger = null; } }
private void cancelOwnerSelectionTask(YangInstanceIdentifier entityPath){ final Cancellable lastScheduledTask = entityToScheduledOwnershipTask.get(entityPath); if(lastScheduledTask != null && !lastScheduledTask.isCancelled()){ lastScheduledTask.cancel(); } }
@Override public void close() throws Exception { registrationSchedule.cancel(); } }