Skip to content

Commit fcee2ad

Browse files
author
Michael Li
committed
Removing isManual
1 parent 52e6316 commit fcee2ad

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/batchutilities/CancellableFlush.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,13 @@
2020
@SdkInternalApi
2121
public final class CancellableFlush implements Runnable {
2222

23-
/**
24-
* isManual is a field used to distinguish a manual flush from a periodically scheduled one. It is set upon calling a
25-
* manual flush
26-
*/
27-
private boolean isManual;
2823
private final Object lock = new Object();
2924
private final Runnable flushBuffer;
3025
private volatile boolean isCancelled = false;
3126
private volatile boolean hasExecuted = false;
3227

33-
public CancellableFlush(Runnable flushBuffer, boolean isManual) {
28+
public CancellableFlush(Runnable flushBuffer) {
3429
this.flushBuffer = flushBuffer;
35-
this.isManual = isManual;
3630
}
3731

3832
@Override
@@ -58,14 +52,10 @@ public boolean hasExecuted() {
5852
}
5953
}
6054

61-
public boolean isManual() {
62-
return isManual;
63-
}
64-
6555
public void reset() {
6656
synchronized (this.lock) {
6757
isCancelled = false;
68-
isManual = false;
58+
hasExecuted = false;
6959
}
7060
}
7161
}

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/batchutilities/ScheduledFlush.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void cancel() {
3434
cancellableFlush.cancel();
3535
}
3636

37-
public boolean isManual() {
38-
return cancellableFlush.isManual();
37+
public boolean hasExecuted() {
38+
return cancellableFlush.hasExecuted();
3939
}
4040
}

0 commit comments

Comments
 (0)