protected void startStabilityTask(Digest d, ViewId view_id, long delay) { stability_lock.lock(); try { if(stability_task_future == null || stability_task_future.isDone()) { StabilitySendTask stability_task=new StabilitySendTask(d, view_id); // runs only once stability_task_future=timer.schedule(stability_task, delay, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); } } finally { stability_lock.unlock(); } }
public void start() throws Exception { timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer cannot be retrieved"); if(desired_avg_gossip > 0) startStableTask(); // we're the only one who sends out STABILITY messages; no need to wait for others to send it (as they won't) if(send_stable_msgs_to_coord_only) stability_delay=0; }
protected void startStableTask() { stable_task_lock.lock(); try { if(stable_task_future == null || stable_task_future.isDone()) { StableTask stable_task=new StableTask(); stable_task_future=timer.scheduleWithDynamicInterval(stable_task, getTransport() instanceof TCP); log.trace("%s: stable task started", local_addr); } } finally { stable_task_lock.unlock(); } }
timer.execute(r, getTransport() instanceof TCP);
protected void startStabilityTask(Digest d, ViewId view_id, long delay) { stability_lock.lock(); try { if(stability_task_future == null || stability_task_future.isDone()) { StabilitySendTask stability_task=new StabilitySendTask(d, view_id); // runs only once stability_task_future=timer.schedule(stability_task, delay, TimeUnit.MILLISECONDS, getTransport() instanceof TCP); } } finally { stability_lock.unlock(); } }
public void start() throws Exception { timer=getTransport().getTimer(); if(timer == null) throw new Exception("timer cannot be retrieved"); if(desired_avg_gossip > 0) startStableTask(); // we're the only one who sends out STABILITY messages; no need to wait for others to send it (as they won't) if(send_stable_msgs_to_coord_only) stability_delay=0; }
protected void startStableTask() { stable_task_lock.lock(); try { if(stable_task_future == null || stable_task_future.isDone()) { StableTask stable_task=new StableTask(); stable_task_future=timer.scheduleWithDynamicInterval(stable_task, getTransport() instanceof TCP); log.trace("%s: stable task started", local_addr); } } finally { stable_task_lock.unlock(); } }
timer.execute(r, getTransport() instanceof TCP);