Skip to content

Commit c1b9b96

Browse files
brido4125jhpark816
authored andcommitted
INTERNAL: Remove volatile keyword and change cause format.
1 parent e487e3e commit c1b9b96

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public abstract class BaseOperationImpl extends SpyObject {
4646
*/
4747
public static final OperationStatus CANCELLED =
4848
new CancelledOperationStatus();
49-
private volatile OperationState state = OperationState.WRITE_QUEUED;
49+
private OperationState state = OperationState.WRITE_QUEUED;
5050
private ByteBuffer cmd = null;
5151
private boolean cancelled = false;
5252
private final AtomicBoolean callbacked = new AtomicBoolean(false);
@@ -96,10 +96,9 @@ public final boolean cancel(String cause) {
9696
if (callbacked.compareAndSet(false, true)) {
9797
cancelled = true;
9898
if (handlingNode != null) {
99-
cancelCause = "Cancelled (" + cause + " : (" + handlingNode.getNodeName() + ")" + ")";
100-
} else {
101-
cancelCause = "Cancelled (" + cause + ")";
99+
cause += " @ " + handlingNode.getNodeName();
102100
}
101+
cancelCause = "Cancelled (" + cause + ")";
103102
wasCancelled();
104103
callback.complete();
105104
return true;

0 commit comments

Comments
 (0)