public void checkKey(Object key) throws PartitionedRegionException {
    if (!hasHash) {
      return; // none provided
    }
    if (key == null) {
      return; // ???
    }

    int expected = key.hashCode();
    if (expected == keyHash) {
      return;
    }
    throw new PartitionedRegionException("Object hashCode inconsistent between cache peers. Here = "
        + expected + "; peer calculated = " + keyHash);
  }
If possible, validate the given key's hashCode against any that was returned by the peer.

@param key the key on the current host. If null, no check is done.
@throws PartitionedRegionException if the keys disagree.
geode-core/src/main/java/org/apache/geode/internal/cache/ForceReattemptException.java