Future<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit, boolean can_block);
protected synchronized void startReconnector() { if(reconnector_task == null || reconnector_task.isDone()) reconnector_task=timer.scheduleWithFixedDelay(this, interval, interval, TimeUnit.MILLISECONDS); }
protected synchronized void startRemoteViewFetcher() { if(remote_view_fetcher_future == null || remote_view_fetcher_future.isDone()) { remote_view_fetcher_future=timer.scheduleWithFixedDelay(new RemoteViewFetcher(), 500, 2000, TimeUnit.MILLISECONDS); } }
/** Requires lock to held by caller */ @GuardedBy("lock") protected void startMonitor() { if(monitor_future == null || monitor_future.isDone()) { last_ack=System.nanoTime(); // start from scratch monitor_future=timer.scheduleWithFixedDelay(new Monitor(), timeout, timeout, TimeUnit.MILLISECONDS, false); num_tries.set(1); } }
protected void startTask() { if(future == null || future.isDone()) { try { future=timer.scheduleWithFixedDelay(this, suspect_msg_interval, suspect_msg_interval, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); } catch(RejectedExecutionException e) { log.warn("%s: task %s was rejected as timer thread pool is shutting down", local_addr, this); } } }
protected void startRetransmitTask() { if(xmit_task == null || xmit_task.isDone()) xmit_task=timer.scheduleWithFixedDelay(new RetransmitTask(), 0, xmit_interval, TimeUnit.MILLISECONDS, sends_can_block); }
protected synchronized void startTask() { stopTask(); task=timer.scheduleWithFixedDelay(this, interval, interval, TimeUnit.MILLISECONDS, false); }
protected void startRetransmitTask() { if(xmit_task == null || xmit_task.isDone()) xmit_task=timer.scheduleWithFixedDelay(new RetransmitTask(), 0, xmit_interval, TimeUnit.MILLISECONDS, sends_can_block); }
protected void startTimeoutChecker() { lock.lock(); try { if(!isTimeoutCheckerRunning()) { timeout_checker_future=timer.scheduleWithFixedDelay(new TimeoutChecker(),timeout_check_interval,timeout_check_interval, TimeUnit.MILLISECONDS, false); } } finally { lock.unlock(); } }
protected void startTimeoutChecker() { lock.lock(); try { if(!isTimeoutCheckerRunning()) { timeout_checker_future=timer.scheduleWithFixedDelay(new TimeoutChecker(), timeout, timeout, TimeUnit.MILLISECONDS, false); } } finally { lock.unlock(); } }
protected synchronized void startResendTask() { if(resend_task == null || resend_task.isDone()) resend_task=timer.scheduleWithFixedDelay(new ResendTask(), resend_interval, resend_interval, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); }
protected void startHeartbeatSender() { lock.lock(); try { if(!isHeartbeatSenderRunning()) heartbeat_sender_future=timer.scheduleWithFixedDelay(new HeartbeatSender(), interval, interval, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); } finally { lock.unlock(); } }
protected void startHeartbeatSender() { lock.lock(); try { if(!isHeartbeatSenderRunning()) { heartbeat_sender_future=timer.scheduleWithFixedDelay(new HeartbeatSender(), 1000, interval, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); } } finally { lock.unlock(); } }
public synchronized void startBatcher() { if(timer == null) timer=getTransport().getTimer(); if(batcher == null || batcher.isDone()) batcher=timer.scheduleWithFixedDelay(new Batcher(), sleep_time, sleep_time, TimeUnit.MILLISECONDS); }
/** * Starts a new task, or - if already running - adds the argument to the running task. * @param suspect */ protected void startBroadcastTask(Address suspect) { bcast_lock.lock(); try { if(bcast_future == null || bcast_future.isDone()) { task=new BroadcastTask(suspected_mbrs); task.addSuspectedMember(suspect); bcast_future=timer.scheduleWithFixedDelay(task, 0, // run immediately the first time timeout, // then every timeout milliseconds, until cancelled TimeUnit.MILLISECONDS, getTransport() instanceof TCP); } else { task.addSuspectedMember(suspect); } } finally { bcast_lock.unlock(); } }
public void start() throws Exception { super.start(); if(max_block_time > 0) { credit_send_task=getTransport().getTimer() .scheduleWithFixedDelay(this::sendCreditRequestsIfNeeded, max_block_time, max_block_time, TimeUnit.MILLISECONDS); } }
public void start() throws Exception { super.start(); if(max_block_time > 0) { credit_send_task=getTransport().getTimer() .scheduleWithFixedDelay(this::sendCreditRequestsIfNeeded, max_block_time, max_block_time, TimeUnit.MILLISECONDS); } }
logical_addr_cache_reaper=timer.scheduleWithFixedDelay(new Runnable() { public void run() { evictLogicalAddressCache();
protected synchronized void startResendTask() { if(resend_task == null || resend_task.isDone()) resend_task=timer.scheduleWithFixedDelay(new ResendTask(), resend_interval, resend_interval, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); }
public synchronized void startBatcher() { if(timer == null) timer=getTransport().getTimer(); if(batcher == null || batcher.isDone()) batcher=timer.scheduleWithFixedDelay(new Batcher(), sleep_time, sleep_time, TimeUnit.MILLISECONDS); }