/** * @param cacheWrite if true, then we're just cleaning up the local cache and calling listeners, * @see DistributedRegion#basicDestroyRegion(RegionEventImpl, boolean, boolean, boolean) */ void basicDestroyRegion(RegionEventImpl event, boolean cacheWrite) throws CacheWriterException, TimeoutException { basicDestroyRegion(event, cacheWrite, true, true); }
/** must be holding destroy lock */ void reinitialize_destroy(RegionEventImpl event) throws CacheWriterException, TimeoutException { final boolean cacheWrite = !event.originRemote; // register this region as reinitializing this.cache.regionReinitializing(getFullPath()); basicDestroyRegion(event, cacheWrite, false/* lock */, true); }
@Override public void close() { RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_CLOSE, null, false, getMyId(), generateEventID()/* generate EventID */); try { // NOTE: the 422dynamicRegions branch added the callbackEvents argument // to basicDestroyRegion and inhibited events on region.close. This // clashed with the new SystemMemberCacheListener functionality in // 5.0, causing unit tests to fail basicDestroyRegion(event, false, true, true); } catch (CacheWriterException e) { // not possible with local operation, CacheWriter not called throw new Error( "CacheWriterException should not be thrown in localDestroyRegion", e); } catch (TimeoutException e) { // not possible with local operation, no distributed locks possible throw new Error( "TimeoutException should not be thrown in localDestroyRegion", e); } }
@Override public void localDestroyRegion(Object aCallbackArgument) { getDataView().checkSupportsRegionDestroy(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOCAL_DESTROY, aCallbackArgument, false, getMyId(), generateEventID()/* generate EventID */); try { basicDestroyRegion(event, false); } catch (CacheWriterException e) { // not possible with local operation, CacheWriter not called throw new Error( "CacheWriterException should not be thrown in localDestroyRegion", e); } catch (TimeoutException e) { // not possible with local operation, no distributed locks possible throw new Error( "TimeoutException should not be thrown in localDestroyRegion", e); } }
public void basicBridgeDestroyRegion(Object callbackArg, final ClientProxyMembershipID client, boolean fromClient, EventID eventId) throws TimeoutException, EntryExistsException, CacheWriterException { if (fromClient) { // If this region is also wan-enabled, then wrap that callback arg in a // GatewayEventCallbackArgument to store the event id. if (isGatewaySenderEnabled()) { callbackArg = new GatewaySenderEventCallbackArgument(callbackArg); } } RegionEventImpl event = new ClientRegionEventImpl(this, Operation.REGION_DESTROY, callbackArg, false, client.getDistributedMember(), client, eventId); basicDestroyRegion(event, true); }
if (!this.isDestroyed) { // don't destroy if already destroyed try { basicDestroyRegion(event, false, true, true); } catch (CancelException ignore) {
new RegionEventImpl(this, op, null, false, getMyId(), generateEventID()); if (destroy) { basicDestroyRegion(event, distributed); } else { basicInvalidateRegion(event);
@Override public void destroyRegion(Object aCallbackArgument) throws CacheWriterException, TimeoutException { this.cache.invokeBeforeDestroyed(this); getDataView().checkSupportsRegionDestroy(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_DESTROY, aCallbackArgument, false, getMyId(), generateEventID()); basicDestroyRegion(event, true); }
super.basicDestroyRegion(event, cacheWrite, lock, callbackEvents);