protected boolean handleGmsHeader(GMS.GmsHeader hdr, Address sender) {
        switch(hdr.getType()) {
            case GMS.GmsHeader.JOIN_REQ:
            case GMS.GmsHeader.JOIN_REQ_WITH_STATE_TRANSFER:
                Address joiner=hdr.getMember();
                if(!(joiner instanceof ExtendedUUID)) {
                    log.debug("joiner %s needs to have an ExtendedUUID but has a %s", sender, joiner.getClass().getSimpleName());
                    break;
                }
                View v=view;
                if(contains(v, (ExtendedUUID)joiner)) {
                    String msg=String.format("join of %s rejected as it would create a view with duplicate members (current view: %s)", joiner, v);
                    log.warn(msg);
                    sendJoinRejectedMessageTo(sender, msg);
                    return false;
                }
                break;
            case GMS.GmsHeader.MERGE_REQ:
                // to be done later when we know how to handle merges in jgroups-raft
                break;
        }
        return true;
    }
protected boolean handleGmsHeader ( GMS . GmsHeader hdr , Address sender ) { switch ( hdr . getType ( ) ) { case GMS . GmsHeader . JOIN_REQ : case GMS . GmsHeader . JOIN_REQ_WITH_STATE_TRANSFER : Address joiner = hdr . getMember ( ) ; if ( ! ( joiner instanceof ExtendedUUID ) ) { log . debug ( "joiner %s needs to have an ExtendedUUID but has a %s" , sender , joiner . getClass ( ) . getSimpleName ( ) ) ; break ; } View v = view ; if ( contains ( v , ( ExtendedUUID ) joiner ) ) { String msg = String . format ( "join of %s rejected as it would create a view with duplicate members (current view: %s)" , joiner , v ) ; log . warn ( msg ) ; sendJoinRejectedMessageTo ( sender , msg ) ; return false ; } break ; case GMS . GmsHeader . MERGE_REQ : break ; } return true ; }
@return True if the message should be passed up, false if it should be discarded