Merge pull request #489 from gqxie/dev

fix some spelling mistakes
This commit is contained in:
Fury Zhu 2018-12-19 17:40:50 +08:00 committed by GitHub
commit 2cf3164307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ import java.util.concurrent.*;
* @author nacos
*/
public class GlobalExecutor {
public static final long HEARTBEAT_INTVERAL_MS = TimeUnit.SECONDS.toMillis(5L);
public static final long HEARTBEAT_INTERVAL_MS = TimeUnit.SECONDS.toMillis(5L);
public static final long LEADER_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(15L);
@ -29,7 +29,7 @@ public class GlobalExecutor {
public static final long TICK_PERIOD_MS = TimeUnit.MILLISECONDS.toMillis(500L);
public static final long ADDRESS_SERVER_UPDATE_INTVERAL_MS = TimeUnit.SECONDS.toMillis(5L);
public static final long ADDRESS_SERVER_UPDATE_INTERVAL_MS = TimeUnit.SECONDS.toMillis(5L);
private static ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(2, new ThreadFactory() {
@Override

View File

@ -120,7 +120,7 @@ public class RaftCore {
GlobalExecutor.register(new MasterElection());
GlobalExecutor.register1(new HeartBeat());
GlobalExecutor.register(new AddressServerUpdater(), GlobalExecutor.ADDRESS_SERVER_UPDATE_INTVERAL_MS);
GlobalExecutor.register(new AddressServerUpdater(), GlobalExecutor.ADDRESS_SERVER_UPDATE_INTERVAL_MS);
if (peers.size() > 0) {
if (lock.tryLock(INIT_LOCK_TIME_SECONDS, TimeUnit.SECONDS)) {
@ -132,7 +132,7 @@ public class RaftCore {
}
Loggers.RAFT.info("timer started: leader timeout ms: " + GlobalExecutor.LEADER_TIMEOUT_MS
+ "; heart-beat timeout ms: " + GlobalExecutor.HEARTBEAT_INTVERAL_MS);
+ "; heart-beat timeout ms: " + GlobalExecutor.HEARTBEAT_INTERVAL_MS);
}
public static List<RaftListener> getListeners() {

View File

@ -34,7 +34,7 @@ public class RaftPeer {
public volatile long leaderDueMs = RandomUtils.nextLong(0, GlobalExecutor.LEADER_TIMEOUT_MS);
public volatile long heartbeatDueMs = RandomUtils.nextLong(0, GlobalExecutor.HEARTBEAT_INTVERAL_MS);
public volatile long heartbeatDueMs = RandomUtils.nextLong(0, GlobalExecutor.HEARTBEAT_INTERVAL_MS);
public State state = State.FOLLOWER;
@ -43,7 +43,7 @@ public class RaftPeer {
}
public void resetHeartbeatDue() {
heartbeatDueMs = GlobalExecutor.HEARTBEAT_INTVERAL_MS;
heartbeatDueMs = GlobalExecutor.HEARTBEAT_INTERVAL_MS;
}
public enum State {