Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleSaslClientAuthenticator.initiateReauthentication()
    public void initiateReauthentication(Time time,
            AuthenticationSuccessOrFailureReceiver authenticationSuccessOrFailureReceiver) {
        if (saslState != SaslState.SEND_APIVERSIONS_REQUEST) {
            // it is possible that the connection was closed; don't retry
notifyFailureDueToUnexpectedState(SaslState.SEND_APIVERSIONS_REQUEST,
                    authenticationSuccessOrFailureReceiver)
            return;
        }
        authenticationRequestEnqueuer().enqueueRequest(this.node, new ApiVersionsRequest.Builder((short) 0),
                authenticationRequestCompletionHandlerForApiVersionsRequest(time,
                        authenticationSuccessOrFailureReceiver.reauthenticationFailed(RetryIndication.DO_NOT_RETRY, String.format(
));
    }

    private void notifyFailureDueToUnexpectedState(SaslState expectedSaslState,
          "Re-authentication initiated butAuthenticationSuccessOrFailureReceiver authenticatorauthenticationSuccessOrFailureReceiver) initial{
 state is incorrect (expected %s): %s",
  // it is possible that the connection was closed; don't retry
        SaslState.SEND_APIVERSIONS_REQUEST, receivedSaslState = saslState));
            if (saslState != SaslState.CLOSED)
                saslState = SaslState.FAILED;
            return;
        }
        authenticationRequestEnqueuer()authenticationSuccessOrFailureReceiver.enqueueRequestreauthenticationFailed(this.nodeRetryIndication.DO_NOT_RETRY, new ApiVersionsRequestString.Builder((short) 0),
format(
                "Re-authentication  authenticationRequestCompletionHandlerForApiVersionsRequest(time,
       was in process but could not proceed because authenticator state is incorrect (expected %s): %s",
                expectedSaslState, authenticationSuccessOrFailureReceiverreceivedSaslState));
    }

And of course the method authenticationRequestCompletionHandlerForApiVersionsRequest(Time, AuthenticationSuccessOrFailureReceiver) looks similar.

...