public static ConnectProtocolCompatibility fromProtocolVersion(short protocolVersion) {
        switch (protocolVersion) {
            case CONNECT_PROTOCOL_V0:
                return EAGER;
            case CONNECT_PROTOCOL_V1:
                return COMPATIBLE;
            case CONNECT_PROTOCOL_V2:
                return SESSIONED;
            default:
                throw new IllegalArgumentException("Unknown Connect protocol version: " + protocolVersion);
        }
    }
Return the enum that corresponds to the Connect protocol version that is given as an argument;
if no mapping is found {@code IllegalArgumentException} is thrown.

@param protocolVersion the version of the protocol; for example,
{@link ConnectProtocol#CONNECT_PROTOCOL_V0 CONNECT_PROTOCOL_V0}. May not be null
@return the enum that corresponds to the protocol compatibility mode
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/ConnectProtocolCompatibility.java