public interface ElectionCandidate
startLeadership()与stopLeadership()方法在同一个线程内交替运行,
且不会出现并发执行的情况.| 限定符和类型 | 方法和说明 |
|---|---|
void |
startLeadership()
开始领导状态.
|
void |
stopLeadership()
终止领导状态.
|
void startLeadership()
throws Exception
Exception - 抛出异常后,将调用stopLeadership()进行清理void stopLeadership()
Copyright © 2017. All rights reserved.