int compareTwoTokens(StoreFindToken token1, StoreFindToken token2) {
      if (token1.getType() != FindTokenType.IndexBased || token2.getType() != FindTokenType.IndexBased) {
        throw new IllegalStateException(
            "At store " + dataDir + " Tokens need to be index based. First: " + token1 + " Second: " + token2);
      }
      if (token1.equals(token2)) {
        return 0;
      }
      if (!token1.getOffset().equals(token2.getOffset())) {
        return token1.getOffset().compareTo(token2.getOffset());
      }
      return token1.getStoreKey().compareTo(token2.getStoreKey());
    }
Compare two StoreFindTokens and return the result as an integer like compareTo interface.
These two tokens have to be IndexBased tokens.
@param token1 The first token to compare.
@param token2 The second token to compare.
@return 0 means they are equal. negative number means token1 is less than token2. positive number means the opposite.
ambry-store/src/main/java/com/github/ambry/store/HardDeleter.java