Search in sources :

Example 1 with InvalidateResponse

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);
        }
    }
}
Also used : InvalidateResponse(org.apache.geode.internal.cache.partitioned.InvalidateMessage.InvalidateResponse) CacheException(org.apache.geode.cache.CacheException) TransactionDataNotColocatedException(org.apache.geode.cache.TransactionDataNotColocatedException) EntryNotFoundException(org.apache.geode.cache.EntryNotFoundException) TransactionDataRebalancedException(org.apache.geode.cache.TransactionDataRebalancedException)

Aggregations

CacheException (org.apache.geode.cache.CacheException)1 EntryNotFoundException (org.apache.geode.cache.EntryNotFoundException)1 TransactionDataNotColocatedException (org.apache.geode.cache.TransactionDataNotColocatedException)1 TransactionDataRebalancedException (org.apache.geode.cache.TransactionDataRebalancedException)1 InvalidateResponse (org.apache.geode.internal.cache.partitioned.InvalidateMessage.InvalidateResponse)1