public static boolean isValidMode(int mode) {
    return (100 <= mode && mode <= 107) || mode == 10;
  }
check the given mode to see if it is assigned to one of the enumeration's instances
geode-core/src/main/java/org/apache/geode/internal/cache/tier/CommunicationMode.java