Search in sources :

Example 1 with RemoteOperationResponse

use of org.apache.geode.internal.cache.RemoteOperationMessage.RemoteOperationResponse in project geode by apache.

the class DistributedTXRegionStub method destroyExistingEntry.

public void destroyExistingEntry(EntryEventImpl event, boolean cacheWrite, Object expectedOldValue) {
    // this.prStats.incPartitionMessagesSent();
    try {
        RemoteOperationResponse response = RemoteDestroyMessage.send(state.getTarget(), event.getLocalRegion(), event, expectedOldValue, DistributionManager.PARTITIONED_REGION_EXECUTOR, true, false);
        response.waitForCacheException();
    } catch (EntryNotFoundException enfe) {
        throw enfe;
    } catch (TransactionDataNotColocatedException enfe) {
        throw enfe;
    } catch (CacheException ce) {
        throw new PartitionedRegionException(LocalizedStrings.PartitionedRegion_DESTROY_OF_ENTRY_ON_0_FAILED.toLocalizedString(state.getTarget()), ce);
    } catch (RegionDestroyedException rde) {
        throw new TransactionDataNotColocatedException(LocalizedStrings.RemoteMessage_REGION_0_NOT_COLOCATED_WITH_TRANSACTION.toLocalizedString(rde.getRegionFullPath()), rde);
    } catch (RemoteOperationException roe) {
        throw new TransactionDataNodeHasDepartedException(roe);
    }
}
Also used : PartitionedRegionException(org.apache.geode.internal.cache.PartitionedRegionException) CacheException(org.apache.geode.cache.CacheException) TransactionDataNotColocatedException(org.apache.geode.cache.TransactionDataNotColocatedException) RegionDestroyedException(org.apache.geode.cache.RegionDestroyedException) RemoteOperationException(org.apache.geode.internal.cache.RemoteOperationException) EntryNotFoundException(org.apache.geode.cache.EntryNotFoundException) RemoteOperationResponse(org.apache.geode.internal.cache.RemoteOperationMessage.RemoteOperationResponse) TransactionDataNodeHasDepartedException(org.apache.geode.cache.TransactionDataNodeHasDepartedException)

Example 2 with RemoteOperationResponse

use of org.apache.geode.internal.cache.RemoteOperationMessage.RemoteOperationResponse in project geode by apache.

the class DistributedTXRegionStub method invalidateExistingEntry.

public void invalidateExistingEntry(EntryEventImpl event, boolean invokeCallbacks, boolean forceNewEntry) {
    try {
        RemoteOperationResponse response = RemoteInvalidateMessage.send(state.getTarget(), event.getRegion(), event, DistributionManager.PARTITIONED_REGION_EXECUTOR, true, false);
        response.waitForCacheException();
    } catch (RegionDestroyedException rde) {
        throw new TransactionDataNotColocatedException(LocalizedStrings.RemoteMessage_REGION_0_NOT_COLOCATED_WITH_TRANSACTION.toLocalizedString(rde.getRegionFullPath()), rde);
    } catch (RemoteOperationException roe) {
        throw new TransactionDataNodeHasDepartedException(roe);
    }
}
Also used : RegionDestroyedException(org.apache.geode.cache.RegionDestroyedException) TransactionDataNotColocatedException(org.apache.geode.cache.TransactionDataNotColocatedException) RemoteOperationException(org.apache.geode.internal.cache.RemoteOperationException) RemoteOperationResponse(org.apache.geode.internal.cache.RemoteOperationMessage.RemoteOperationResponse) TransactionDataNodeHasDepartedException(org.apache.geode.cache.TransactionDataNodeHasDepartedException)

Aggregations

RegionDestroyedException (org.apache.geode.cache.RegionDestroyedException)2 TransactionDataNodeHasDepartedException (org.apache.geode.cache.TransactionDataNodeHasDepartedException)2 TransactionDataNotColocatedException (org.apache.geode.cache.TransactionDataNotColocatedException)2 RemoteOperationException (org.apache.geode.internal.cache.RemoteOperationException)2 RemoteOperationResponse (org.apache.geode.internal.cache.RemoteOperationMessage.RemoteOperationResponse)2 CacheException (org.apache.geode.cache.CacheException)1 EntryNotFoundException (org.apache.geode.cache.EntryNotFoundException)1 PartitionedRegionException (org.apache.geode.internal.cache.PartitionedRegionException)1