/**
* 启动抢注线程, 使用传入的scheduler线程池.
*/
public void start(ScheduledExecutorService scheduledThreadPool) {
hostId = generateHostId();
electorJob = scheduledThreadPool.scheduleAtFixedRate(new WrapExceptionRunnable(this), 0, intervalSecs,
TimeUnit.SECONDS);
logger.info("masterElector for {} start, hostName:{}.", masterKey, hostId);
}