public short registerControllerRecordVersion() {
        if (isAtLeast(MetadataVersion.IBP_3_7_IV0)) {
            return (short) 0;
        } else {
            throw new RuntimeException("Controller registration is not supported in " +
                    "MetadataVersion " + this);
        }
    }
An array containing all of the MetadataVersion entries.

This is essentially a cached copy of MetadataVersion.values. Unlike that function, it doesn't
allocate a new array each time.
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java