Shift authority to the new pub/sub client presence system

This commit is contained in:
Jon Chambers
2024-11-06 12:10:44 -05:00
committed by GitHub
parent aad12670b2
commit 9d19fc9ecc
8 changed files with 157 additions and 218 deletions

View File

@@ -513,6 +513,17 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
);
Metrics.counter(DISPLACEMENT_COUNTER_NAME, tags).increment();
}
@Override
public void handleConnectionDisplaced(final boolean connectedElsewhere) {
final Tags tags = Tags.of(
UserAgentTagUtil.getPlatformTag(client.getUserAgent()),
Tag.of("connectedElsewhere", String.valueOf(connectedElsewhere)),
Tag.of(PRESENCE_MANAGER_TAG, "pubsub")
);
Metrics.counter(DISPLACEMENT_COUNTER_NAME, tags).increment();
final int code;
final String message;
@@ -534,17 +545,6 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
}
}
@Override
public void handleConnectionDisplaced(final boolean connectedElsewhere) {
final Tags tags = Tags.of(
UserAgentTagUtil.getPlatformTag(client.getUserAgent()),
Tag.of("connectedElsewhere", String.valueOf(connectedElsewhere)),
Tag.of(PRESENCE_MANAGER_TAG, "pubsub")
);
Metrics.counter(DISPLACEMENT_COUNTER_NAME, tags).increment();
}
private record StoredMessageInfo(UUID guid, long serverTimestamp) {
}