public static int parseHashType ( String name ) { if ( "jenkins" . equalsIgnoreCase ( name ) ) { return JENKINS_HASH ; } else if ( "murmur" . equalsIgnoreCase ( name ) ) { return MURMUR_HASH ; } else { return INVALID_HASH ; } }
This utility method converts String representation of hash function name to a symbolic constant . Currently two function types are supported jenkins and murmur .