private boolean mustDiscardEntry(Region.Entry<?, ?> entry, long newestTimestampAllowed,
        InternalRegion region) {
      if (entry instanceof DestroyedEntry) {
        return true;
      }
      if (!region.getAttributes().getConcurrencyChecksEnabled()) {
        return false;
      }
      long timestamp;
      if (entry instanceof NonTXEntry) {
        timestamp = ((NonTXEntry) entry).getRegionEntry().getVersionStamp().getVersionTimeStamp();
      } else {
        timestamp = ((EntrySnapshot) entry).getVersionTag().getVersionTimeStamp();
      }
      return timestamp > newestTimestampAllowed;
    }
Entries are discarded if the entry has been destroyed or
if the timestamp of the entry points to a moment in time
later than the timestamp passed.
The timestamp passed must be the timestamp when the command started.
This is done so that the command only copies entries created
or updated before the command was launched. Entries created
or updated after will be replicated by the normal WAN replication
mechanism.
Doing this, two things are accomplished:
- The command is more efficient as it does not copy entries that
will anyway be replicated by the normal WAN replication mechanism.
- A race condition that could reorder events in the receiver is avoided:
If there are two put operations in the same millisecond and also
the command reads this entry in this same millisecond, it could be
that the command reads the first value put but the replication of
the second value arrives to the other site before the replication
of the command. Given that the timestamp for the entry of both values
is the same, the first value will overwrite the second value in the
receiving site.

@param entry Entry to be or not to be discarded
@param newestTimestampAllowed timestamp to compare with the entry's timestamp
@return true if the entry is an instance of DestroyedEntry or if the
        timestamp of the entry points to a point in time later than the timestamp
        passed.
geode-wan/src/main/java/org/apache/geode/management/internal/cli/functions/WanCopyRegionFunctionDelegate.java