public static boolean isNewerSerialNumber(int newSerialNumber, int oldSerialNumber) {
    boolean serialRolled =
        oldSerialNumber > ROLLOVER_THRESHOLD_UPPER && newSerialNumber < ROLLOVER_THRESHOLD_LOWER;
    return serialRolled || oldSerialNumber < newSerialNumber;
  }
Compare two serial numbers

@return return true if the first serial number (newSerialNumber) is more recent
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java