public EntrySnapshot getEntryRemotely(InternalDistributedMember targetNode, Integer bucketId,
      Object key, boolean access, boolean allowTombstones)
      throws EntryNotFoundException, PrimaryBucketException, ForceReattemptException {
    FetchEntryResponse r = FetchEntryMessage.send(targetNode, this, key, access);
    prStats.incPartitionMessagesSent();
    EntrySnapshot entry = r.waitForResponse();
    if (entry != null && entry.getRawValue() == Token.TOMBSTONE) {
      if (!allowTombstones) {
        return null;
      }
    }
    return entry;
  }
Checks if a key is contained remotely.

@param targetNode the node where bucket region for the key exists.
@param bucketId the bucket id for the key.
@param key the key, whose value needs to be checks
@param access true if caller wants last access time updated
@param allowTombstones whether tombstones should be returned
@throws EntryNotFoundException if the entry doesn't exist
@throws ForceReattemptException if the peer is no longer available
@return true if the passed key is contained remotely.
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java