private boolean alreadyInvalid(Object key, EntryEventImpl event) {
    @Unretained(ENTRY_EVENT_NEW_VALUE)
    Object newValue = event.getRawNewValue();
    if (newValue == null || Token.isInvalid(newValue)) {
      RegionEntry entry = entries.getEntry(key);
      if (entry != null) {
        synchronized (entry) {
          if (entry.isInvalid()) {
            VersionStamp stamp = entry.getVersionStamp();
            if (stamp == null || event.getVersionTag() == null) {
              return true;
            }
            if (stamp.getEntryVersion() >= event.getVersionTag().getEntryVersion()) {
              return true;
            }
          }
        }
      }
    }
    return false;
  }
Returns true if the cache already has this key as an invalid entry with a version >= the one in
the given event. This is used in cache-miss processing to avoid overwriting the entry when it
is not necessary, so that we avoid invoking cache listeners.

@return whether the entry is already invalid
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java