MCPcopy Create free account
hub / github.com/e2wugui/zeze / stop

Method stop

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/Agent.java:255–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253 }
254
255 public void stop() throws Exception {
256 mutex.lock(); // stop 不中断
257 try {
258 if (resendTask != null) {
259 resendTask.cancel(true);
260 resendTask = null;
261 }
262 if (client == null)
263 return;
264
265 client.stop();
266 client = null;
267
268 leader = null;
269
270 trigger(pending, "stopPending");
271
272 pending.clear();
273 } finally {
274 mutex.unlock();
275 }
276 }
277
278 public Agent(String name, Application zeze) throws Exception {
279 this(name, zeze, null);

Callers 1

waitForLeaderMethod · 0.95

Calls 6

triggerMethod · 0.95
lockMethod · 0.65
cancelMethod · 0.65
stopMethod · 0.65
clearMethod · 0.65
unlockMethod · 0.65

Tested by

no test coverage detected