Skip to content

Commit

Permalink
[hotfix][typo] Fix typo in DelayedOperationManager
Browse files Browse the repository at this point in the history
  • Loading branch information
libenchao committed Dec 18, 2024
1 parent 0bd16ef commit 6441c0c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public final class DelayedOperationManager<T extends DelayedOperation> {
private static final int DEFAULT_SHARDS = 512;

private final String managerName;
private final Timer timoutTimer;
private final Timer timeoutTimer;

private final int serverId;
private final int purgeInterval;
Expand All @@ -68,7 +68,7 @@ public final class DelayedOperationManager<T extends DelayedOperation> {
public DelayedOperationManager(
String managerName, int serverId, int purgeInterval, MetricGroup metricGroup) {
this.managerName = managerName;
this.timoutTimer = new DefaultTimer(managerName);
this.timeoutTimer = new DefaultTimer(managerName);
this.serverId = serverId;
this.purgeInterval = purgeInterval;
this.watcherLists = new ArrayList<>(DEFAULT_SHARDS);
Expand Down Expand Up @@ -117,7 +117,7 @@ public boolean tryCompleteElseWatch(T operation, List<Object> watchKeys) {

// if it cannot be completed by now and hence is watched, add to the expiry queue also.
if (!operation.isCompleted()) {
timoutTimer.add(operation);
timeoutTimer.add(operation);

if (operation.isCompleted()) {
// cancel the timer task.
Expand Down Expand Up @@ -163,7 +163,7 @@ public int watched() {

/** Return the number of delayed operations in the expiry queue. */
public int numDelayed() {
return timoutTimer.numOfTimerTasks();
return timeoutTimer.numOfTimerTasks();
}

/**
Expand Down Expand Up @@ -220,7 +220,7 @@ public void shutdown() {
expirationReaper.initiateShutdown();
// improve shutdown time by waking up any ShutdownableThread(s) blocked on poll by
// sending a no-op.
timoutTimer.add(
timeoutTimer.add(
new TimerTask(0) {
@Override
public void run() {}
Expand All @@ -231,7 +231,7 @@ public void run() {}
throw new FlussRuntimeException("Error while shutdown delayed operation manager", e);
}

timoutTimer.shutdown();
timeoutTimer.shutdown();
}

/** A list of operation watching keys. */
Expand Down Expand Up @@ -346,7 +346,7 @@ public void doWork() {
}

private void advanceClock() throws InterruptedException {
timoutTimer.advanceClock(200L);
timeoutTimer.advanceClock(200L);

// Trigger an expiry operation if the number of completed but still being watched
// operations is
Expand Down

0 comments on commit 6441c0c

Please sign in to comment.