@Override public void run() { while (!shutdown) { if (!shutdown) { long timeToSleep = getClusterCheckinInterval(); long transpiredTime = (System.currentTimeMillis() - lastCheckin); timeToSleep = timeToSleep - transpiredTime; if (timeToSleep <= 0) { timeToSleep = 100L; } if(numFails > 0) { timeToSleep = Math.max(getDbRetryInterval(), timeToSleep); } try { Thread.sleep(timeToSleep); } catch (Exception ignore) { } } if (!shutdown && this.manage()) { signalSchedulingChangeImmediately(0L); } }//while !shutdown } }
@Override public void run() { while (!shutdown) { if (!shutdown) { long timeToSleep = getClusterCheckinInterval(); long transpiredTime = (System.currentTimeMillis() - lastCheckin); timeToSleep = timeToSleep - transpiredTime; if (timeToSleep <= 0) { timeToSleep = 100L; } if(numFails > 0) { timeToSleep = Math.max(getDbRetryInterval(), timeToSleep); } try { Thread.sleep(timeToSleep); } catch (Exception ignore) { } } if (!shutdown && this.manage()) { signalSchedulingChangeImmediately(0L); } }//while !shutdown } }
public void run() { while (!shutdown) { if (!shutdown) { long timeToSleep = getClusterCheckinInterval(); long transpiredTime = (System.currentTimeMillis() - lastCheckin); timeToSleep = timeToSleep - transpiredTime; if (timeToSleep <= 0) { timeToSleep = 100L; } if(numFails > 0) { timeToSleep = Math.max(getDbRetryInterval(), timeToSleep); } try { Thread.sleep(timeToSleep); } catch (Exception ignore) { } } if (!shutdown && this.manage()) { signalSchedulingChange(0L); } }//while !shutdown } }
public void run() { while (!shutdown) { if (!shutdown) { long timeToSleep = getClusterCheckinInterval(); long transpiredTime = (System.currentTimeMillis() - lastCheckin); timeToSleep = timeToSleep - transpiredTime; if (timeToSleep <= 0) { timeToSleep = 100L; } if(numFails > 0) { timeToSleep = Math.max(getDbRetryInterval(), timeToSleep); } try { Thread.sleep(timeToSleep); } catch (Exception ignore) { } } if (!shutdown && this.manage()) { signalSchedulingChange(0L); } }//while !shutdown } }
public void initialize() { this.manage(); this.start(); }
public void initialize() { this.manage(); this.start(); }
public void initialize() { this.manage(); ThreadExecutor executor = getThreadExecutor(); executor.execute(ClusterManager.this); }
public void initialize() { this.manage(); ThreadExecutor executor = getThreadExecutor(); executor.execute(ClusterManager.this); }