Skip to content

Commit

Permalink
[Java] More naming while doing a review for #393.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Sep 22, 2017
1 parent 83cb139 commit 78517ef
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public enum State
private final boolean isExclusive;
private final boolean spiesSimulateConnection;
private volatile long timeOfLastStatusMessageMs;
private volatile boolean isSubscriptionConnected;
private volatile boolean hasReceivers;
private volatile boolean hasSenderReleased;
private volatile boolean isEndOfStream;
private volatile boolean hasSpiesConnected;
Expand Down Expand Up @@ -365,9 +365,9 @@ public void onStatusMessage(final StatusMessageFlyweight msg, final InetSocketAd
{
timeOfLastStatusMessageMs = epochClock.time();

if (!isSubscriptionConnected)
if (!hasReceivers)
{
isSubscriptionConnected = true;
hasReceivers = true;
}

senderLimit.setOrdered(
Expand Down Expand Up @@ -425,7 +425,7 @@ int updatePublisherLimit()
int workCount = 0;

final long senderPosition = this.senderPosition.getVolatile();
if (isSubscriptionConnected || (spiesSimulateConnection && spyPositions.length > 0))
if (hasReceivers || (spiesSimulateConnection && spyPositions.length > 0))
{
long minConsumerPosition = senderPosition;
if (spyPositions.length > 0)
Expand Down Expand Up @@ -525,7 +525,7 @@ private void setupMessageCheck(final long nowNs, final int activeTermId, final i
timeOfLastSetupNs = nowNs;
timeOfLastSendOrHeartbeatNs = nowNs;

if (isSubscriptionConnected)
if (hasReceivers)
{
shouldSendSetupFrame = false;
}
Expand Down Expand Up @@ -632,9 +632,9 @@ private boolean spiesFinishedConsuming(final DriverConductor conductor, final lo

private void updateConnectedStatus(final long timeMs)
{
if (isSubscriptionConnected && timeMs > (timeOfLastStatusMessageMs + PUBLICATION_CONNECTION_TIMEOUT_MS))
if (hasReceivers && timeMs > (timeOfLastStatusMessageMs + PUBLICATION_CONNECTION_TIMEOUT_MS))
{
isSubscriptionConnected = false;
hasReceivers = false;
}

if (spiesSimulateConnection && spyPositions.length > 0)
Expand Down Expand Up @@ -669,7 +669,7 @@ public void onTimeEvent(final long timeNs, final long timeMs, final DriverConduc
break;
}

if (isSubscriptionConnected)
if (hasReceivers)
{
break;
}
Expand Down

0 comments on commit 78517ef

Please # to comment.