Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
areyouok committed Dec 22, 2024
1 parent 8f10158 commit 3eda5dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ public ChainWriter(RaftGroupConfigEx config, String fiberNamePrefix, int writePe

protected abstract void forceFinish(WriteTask writeTask);

public void startForceFiber() {
public void start() {
forceFiber.start();
}

public FiberFuture<Void> shutdownForceFiber() {
public FiberFuture<Void> stop() {
this.close = true;
needForceCondition.signal();
if (forceFiber.isStarted()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public FiberFrame<Pair<Long, Long>> initRestorePos() throws Exception {
}
log.info("restore from index: {}, pos: {}", restoreIndex, restoreStartPos);
flushFiber.start();
chainWriter.startForceFiber();
chainWriter.start();
return FiberFrame.completedFrame(new Pair<>(restoreIndex, restoreStartPos));
} else {
nextIndex = restoreIndex + 1;
Expand All @@ -150,7 +150,7 @@ private FrameCallResult afterLoad(Long restoreIndexPos) {
log.info("restore from index: {}, pos: {}", finalRestoreIndex, restoreIndexPos);
setResult(new Pair<>(finalRestoreIndex, restoreIndexPos));
flushFiber.start();
chainWriter.startForceFiber();
chainWriter.start();
return Fiber.frameReturn();
}

Expand Down Expand Up @@ -488,7 +488,7 @@ public FiberFuture<Void> close() {
if (ex != null) {
closeFuture.completeExceptionally(ex);
} else {
chainWriter.shutdownForceFiber().registerCallback((v2, ex2) -> {
chainWriter.stop().registerCallback((v2, ex2) -> {
if (ex2 != null) {
closeFuture.completeExceptionally(ex2);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class LogAppender {

public void startFiber() {
appendFiber.start();
chainWriter.startForceFiber();
chainWriter.start();
}

public FiberFuture<Void> close() {
Expand All @@ -107,7 +107,7 @@ public FiberFuture<Void> close() {
if (ex != null) {
closeFuture.completeExceptionally(ex);
} else {
chainWriter.shutdownForceFiber().registerCallback((v2, ex2) -> {
chainWriter.stop().registerCallback((v2, ex2) -> {
if (ex2 != null) {
closeFuture.completeExceptionally(ex2);
} else {
Expand Down

0 comments on commit 3eda5dd

Please sign in to comment.