+
+ void disableTracking(final ClientIdentifier clientId) {
+ final FrontendIdentifier frontendId = clientId.getFrontendId();
+ final FrontendClientMetadataBuilder client = clients.get(frontendId);
+ if (client == null) {
+ LOG.debug("{}: disableTracking {} does not match any client, ignoring", shardName, clientId);
+ return;
+ }
+ if (!clientId.equals(client.getIdentifier())) {
+ LOG.debug("{}: disableTracking {} does not match client {}, ignoring", shardName, clientId, client);
+ return;
+ }
+ if (client instanceof FrontendClientMetadataBuilder.Disabled) {
+ LOG.debug("{}: client {} is has already disabled tracking", shardName, client);
+ return;
+ }
+
+ verify(clients.replace(frontendId, client, new FrontendClientMetadataBuilder.Disabled(shardName, clientId)));
+ }