void removeEndpoints(String memberUuid) {
   Iterator<ClientEndpoint> iterator = endpoints.values().iterator();
   while (iterator.hasNext()) {
     ClientEndpoint endpoint = iterator.next();
     String ownerUuid = endpoint.getPrincipal().getOwnerUuid();
     if (memberUuid.equals(ownerUuid)) {
       iterator.remove();
       removeEndpoint(endpoint, true);
     }
   }
 }
 private void handleAuthenticationFailure() {
   Exception exception;
   if (nodeEngine.isActive()) {
     String message = "Client " + endpoint + " must authenticate before any operation.";
     logger.severe(message);
     exception = new AuthenticationException(message);
   } else {
     exception = new HazelcastInstanceNotActiveException();
   }
   sendClientMessage(exception);
   endpointManager.removeEndpoint(endpoint);
 }
 void removeEndpoint(final ClientEndpoint endpoint) {
   removeEndpoint(endpoint, false);
 }