@Override
  public Object getRoutingObject(EntryOperation<String, Object> opDetails) {
    String key = opDetails.getKey();
    String delimiter = getDelimiter();
    int idx = key.indexOf(delimiter);
    if (idx == -1) {
      throw new IllegalArgumentException(
          "The key \"" + key + "\" does not contains the \"" + delimiter + "\" delimiter.");
    }
    return key.substring(0, idx);
  }
Returns the prefix of the String key that precedes the first "|" in the key.

@throws ClassCastException if the key is not an instance of String
@throws IllegalArgumentException if the key does not contain at least one "|".
geode-core/src/main/java/org/apache/geode/cache/util/StringPrefixPartitionResolver.java