use of org.apache.geode.internal.cache.partitioned.InvalidateMessage.InvalidateResponse in project geode by apache.
the class PartitionedRegion method invalidateRemotely.
/**
* invalidates the remote object with the given key.
*
* @param recipient the member id of the recipient of the operation
* @param bucketId the id of the bucket the key hashed into
* @throws EntryNotFoundException if the entry does not exist in this region
* @throws PrimaryBucketException if the bucket on that node is not the primary copy
* @throws ForceReattemptException if the peer is no longer available
*/
public void invalidateRemotely(DistributedMember recipient, Integer bucketId, EntryEventImpl event) throws EntryNotFoundException, PrimaryBucketException, ForceReattemptException {
InvalidateResponse response = InvalidateMessage.send(recipient, this, event);
if (response != null) {
this.prStats.incPartitionMessagesSent();
try {
response.waitForResult();
event.setVersionTag(response.versionTag);
return;
} catch (EntryNotFoundException ex) {
throw ex;
} catch (TransactionDataNotColocatedException ex) {
throw ex;
} catch (TransactionDataRebalancedException e) {
throw e;
} catch (CacheException ce) {
throw new PartitionedRegionException(LocalizedStrings.PartitionedRegion_INVALIDATION_OF_ENTRY_ON_0_FAILED.toLocalizedString(recipient), ce);
}
}
}
Aggregations