public static Priority getPriorityByName(String name) {
        return Priority.valueOf(name);
    }
Get priority enum instance by its name.

@param name name of priority.
@return priority enum instance, given that <code>name</code> is valid
@throws IllegalArgumentException if priority name is unknown
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/DocumentProtocol.java