Search in sources :

Example 11 with JoinResponseMessage

use of org.apache.geode.distributed.internal.membership.gms.messages.JoinResponseMessage in project geode by apache.

the class GMSJoinLeave method recordViewRequest.

private void recordViewRequest(DistributionMessage request) {
    logger.debug("Recording the request to be processed in the next membership view");
    synchronized (viewRequests) {
        viewRequests.add(request);
        if (viewCreator != null && services.getMessenger().getClusterSecretKey() != null) {
            if (request instanceof JoinRequestMessage) {
                JoinRequestMessage jreq = (JoinRequestMessage) request;
                // this will inform about cluster-secret key, as we have authenticated at this point
                JoinResponseMessage response = new JoinResponseMessage(jreq.getSender(), services.getMessenger().getClusterSecretKey(), jreq.getRequestId());
                services.getMessenger().send(response);
            }
        }
        viewRequests.notifyAll();
    }
}
Also used : JoinResponseMessage(org.apache.geode.distributed.internal.membership.gms.messages.JoinResponseMessage) JoinRequestMessage(org.apache.geode.distributed.internal.membership.gms.messages.JoinRequestMessage)

Aggregations

JoinResponseMessage (org.apache.geode.distributed.internal.membership.gms.messages.JoinResponseMessage)11 InternalDistributedMember (org.apache.geode.distributed.internal.membership.InternalDistributedMember)6 NetView (org.apache.geode.distributed.internal.membership.NetView)6 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)5 MembershipTest (org.apache.geode.test.junit.categories.MembershipTest)5 Test (org.junit.Test)5 SystemConnectException (org.apache.geode.SystemConnectException)4 IOException (java.io.IOException)3 GemFireConfigException (org.apache.geode.GemFireConfigException)3 DistributedSystemDisconnectedException (org.apache.geode.distributed.DistributedSystemDisconnectedException)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 DataInputStream (java.io.DataInputStream)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 InetSocketAddress (java.net.InetSocketAddress)2 UnknownHostException (java.net.UnknownHostException)2 HashSet (java.util.HashSet)2 Properties (java.util.Properties)2 ForcedDisconnectException (org.apache.geode.ForcedDisconnectException)2 GemFireIOException (org.apache.geode.GemFireIOException)2 FindCoordinatorRequest (org.apache.geode.distributed.internal.membership.gms.locator.FindCoordinatorRequest)2