private int getSchemaRegionConsensusProtocol() {
    switch (IoTDBDescriptor.getInstance().getConfig().getSchemaRegionConsensusProtocolClass()) {
      case ConsensusFactory.RATIS_CONSENSUS:
        return 0;
      case ConsensusFactory.SIMPLE_CONSENSUS:
        return 1;
      default:
        throw new IllegalArgumentException();
    }
  }
Encode SchemaRegionConsensusProtocol to ordinal.

@throws IllegalArgumentException if the protocol is not supported.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/metric/SchemaEngineMemMetric.java