void onStatusMessage(final StatusMessageFlyweight msg, final InetSocketAddress address) { final long nowNs = nanoClock.nanoTime(); final ArrayList<Destination> destinations = this.destinations; boolean isExisting = false; final long receiverId = msg.receiverId(); for (int i = 0, size = destinations.size(); i < size; i++) { final Destination destination = destinations.get(i); if (receiverId == destination.receiverId && address.getPort() == destination.port) { destination.timeOfLastActivityNs = nowNs; isExisting = true; break; } } if (!isExisting) { destinations.add(new Destination(nowNs, receiverId, address)); } }
private static void dissect(final StatusMessageFlyweight msg, final StringBuilder builder) { builder .append("SM ") .append(msg.flags()) .append(" len ") .append(msg.frameLength()) .append(' ') .append(msg.sessionId()) .append(':') .append(msg.streamId()) .append(':') .append(msg.consumptionTermId()) .append(" @") .append(msg.consumptionTermOffset()) .append(' ') .append(msg.receiverWindowLength()) .append(' ') .append(msg.receiverId()); }
final long receiverId = flyweight.receiverId(); final boolean isFromPreferred = isFromPreferred(flyweight); final long lastPositionPlusWindow = position + windowLength;
final long receiverId = flyweight.receiverId(); boolean isExisting = false; long minPosition = Long.MAX_VALUE;
.receiverId(receiverId) .version(HeaderFlyweight.CURRENT_VERSION) .headerType(HeaderFlyweight.HDR_TYPE_SM)
void onStatusMessage(final StatusMessageFlyweight msg, final InetSocketAddress address) { final long nowNs = nanoClock.nanoTime(); final ArrayList<Destination> destinations = this.destinations; boolean isExisting = false; final long receiverId = msg.receiverId(); for (int i = 0, size = destinations.size(); i < size; i++) { final Destination destination = destinations.get(i); if (receiverId == destination.receiverId && address.getPort() == destination.port) { destination.timeOfLastActivityNs = nowNs; isExisting = true; break; } } if (!isExisting) { destinations.add(new Destination(nowNs, receiverId, address)); } }
void onStatusMessage(final StatusMessageFlyweight msg, final InetSocketAddress address) { final long nowNs = nanoClock.nanoTime(); final ArrayList<Destination> destinations = this.destinations; boolean isExisting = false; final long receiverId = msg.receiverId(); for (int i = 0, size = destinations.size(); i < size; i++) { final Destination destination = destinations.get(i); if (receiverId == destination.receiverId && address.getPort() == destination.port) { destination.timeOfLastActivityNs = nowNs; isExisting = true; break; } } if (!isExisting) { destinations.add(new Destination(nowNs, receiverId, address)); } }
private static void dissect(final StatusMessageFlyweight msg, final StringBuilder builder) { builder .append("SM ") .append(msg.flags()) .append(" len ") .append(msg.frameLength()) .append(' ') .append(msg.sessionId()) .append(':') .append(msg.streamId()) .append(':') .append(msg.consumptionTermId()) .append(" @") .append(msg.consumptionTermOffset()) .append(' ') .append(msg.receiverWindowLength()) .append(' ') .append(msg.receiverId()); }
final long receiverId = flyweight.receiverId(); boolean isExisting = false; long minPosition = Long.MAX_VALUE;
final long receiverId = flyweight.receiverId(); final boolean isFromPreferred = isFromPreferred(flyweight); final long lastPositionPlusWindow = position + windowLength;
final long receiverId = flyweight.receiverId(); final boolean isFromPreferred = isFromPreferred(flyweight); final long lastPositionPlusWindow = position + windowLength;
final long receiverId = flyweight.receiverId(); boolean isExisting = false; long minPosition = Long.MAX_VALUE;
.receiverId(receiverId) .version(HeaderFlyweight.CURRENT_VERSION) .headerType(HeaderFlyweight.HDR_TYPE_SM)
.receiverId(receiverId) .version(HeaderFlyweight.CURRENT_VERSION) .headerType(HeaderFlyweight.HDR_TYPE_SM)