Skip to content

Commit

Permalink
chore: refine modifier of inActivationChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
okg-cxf committed Jan 17, 2024
1 parent 23e6d44 commit ea9770e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/io/lettuce/core/protocol/DefaultEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,18 @@ public class DefaultEndpoint implements RedisChannelWriter, Endpoint, PushHandle

private static final AtomicLong ENDPOINT_COUNTER = new AtomicLong();

private static final AtomicIntegerFieldUpdater<DefaultEndpoint> QUEUE_SIZE = AtomicIntegerFieldUpdater
.newUpdater(DefaultEndpoint.class, "queueSize");
private static final AtomicIntegerFieldUpdater<DefaultEndpoint> QUEUE_SIZE = AtomicIntegerFieldUpdater.newUpdater(
DefaultEndpoint.class, "queueSize");

private static final AtomicIntegerFieldUpdater<DefaultEndpoint> STATUS = AtomicIntegerFieldUpdater
.newUpdater(DefaultEndpoint.class, "status");
private static final AtomicIntegerFieldUpdater<DefaultEndpoint> STATUS = AtomicIntegerFieldUpdater.newUpdater(
DefaultEndpoint.class, "status");

private static final int ST_OPEN = 0;

private static final int ST_CLOSED = 1;

protected volatile Channel channel;

protected Channel inActivationChannel;

private final Reliability reliability;

private final ClientOptions clientOptions;
Expand Down Expand Up @@ -107,6 +105,8 @@ public class DefaultEndpoint implements RedisChannelWriter, Endpoint, PushHandle

private boolean inActivation = false;

private Channel inActivationChannel; // No need to be volatile, since it is always accessed from the same thread.

private ConnectionWatchdog connectionWatchdog;

private ConnectionFacade connectionFacade;
Expand Down Expand Up @@ -286,7 +286,6 @@ private RedisException validateWrite(int commands) {
return new RedisException("Connection is closed");
}


final boolean connected = isConnected(this.channel);
if (usesBoundedQueues()) {

Expand Down

0 comments on commit ea9770e

Please sign in to comment.