/** 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); }
/** 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); }
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(LocalizedStrings.LocalRegion_CACHEWRITEREXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } catch (TimeoutException e) { // not possible with local operation, no distributed locks possible throw new Error(LocalizedStrings.LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } }
@Override protected final boolean localDestroy() throws CacheException { LocalRegion lr = getLocalRegion(); RegionEventImpl event = new RegionEventImpl(lr, Operation.REGION_EXPIRE_LOCAL_DESTROY, null, false, lr.getMyId(), lr.generateEventID() /* generate EventID */); lr.basicDestroyRegion(event, false); return true; }
@Override protected final boolean destroy(boolean isPending) throws CacheException { LocalRegion lr = getLocalRegion(); RegionEventImpl event = new RegionEventImpl(lr, Operation.REGION_EXPIRE_DESTROY, null, false, lr.getMyId(), lr.generateEventID() /* generate EventID */); lr.basicDestroyRegion(event, true); return true; }
public void close(RegionEventImpl event) { 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(LocalizedStrings.LocalRegion_CACHEWRITEREXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } catch (TimeoutException e) { // not possible with local operation, no distributed locks possible throw new Error(LocalizedStrings.LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } }
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(LocalizedStrings.LocalRegion_CACHEWRITEREXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } catch (TimeoutException e) { // not possible with local operation, no distributed locks possible throw new Error(LocalizedStrings.LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } }
public void basicBridgeDestroyRegion( Object p_callbackArg, final ClientProxyMembershipID client, boolean fromClient, EventID eventId) throws TimeoutException, EntryExistsException, CacheWriterException { Object callbackArg = p_callbackArg; //long startPut = CachePerfStats.getStatTime(); 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/* context */, eventId); basicDestroyRegion(event, true); }
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(LocalizedStrings.LocalRegion_CACHEWRITEREXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } catch (TimeoutException e) { // not possible with local operation, no distributed locks possible throw new Error(LocalizedStrings.LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION.toLocalizedString(), e); } }
public void destroyRegion(Object aCallbackArgument) throws CacheWriterException, TimeoutException { getDataView().checkSupportsRegionDestroy(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_DESTROY, aCallbackArgument, false, getMyId(), generateEventID()); basicDestroyRegion(event, true); }
public void destroyRegion(Object aCallbackArgument) throws CacheWriterException, TimeoutException { getDataView().checkSupportsRegionDestroy(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_DESTROY, aCallbackArgument, false, getMyId(), generateEventID()); basicDestroyRegion(event, true); }
RegionEventImpl event = new RegionEventImpl(this, op, null, false, getMyId(), generateEventID()); if (destroy) { basicDestroyRegion(event, distributed); } else { basicInvalidateRegion(event);
if (!this.isDestroyed) { // bruce: don't destroy if already destroyed try { basicDestroyRegion(ev, false, true, true);
public void basicBridgeDestroyRegion( Object p_callbackArg, final ClientProxyMembershipID client, boolean fromClient, EventID eventId) throws TimeoutException, EntryExistsException, CacheWriterException { Object callbackArg = p_callbackArg; //long startPut = CachePerfStats.getStatTime(); if (fromClient) { // If this region is also wan-enabled, then wrap that callback arg in a // GatewayEventCallbackArgument to store the event id. if (getAttributes().getEnableGateway()) { callbackArg = new GatewayEventCallbackArgument(callbackArg); } if (isGatewaySenderEnabled() && !(callbackArg instanceof GatewaySenderEventCallbackArgument)) { callbackArg = new GatewaySenderEventCallbackArgumentImpl(callbackArg); } } RegionEventImpl event = new BridgeRegionEventImpl(this, Operation.REGION_DESTROY, callbackArg,false, client.getDistributedMember(), client/* context */, eventId); basicDestroyRegion(event, true); }
if (!this.isDestroyed) { // bruce: don't destroy if already destroyed try { basicDestroyRegion(ev, false, true, true);
super.basicDestroyRegion(event, cacheWrite, lock, callbackEvents);
void basicDestroyRegion(RegionEventImpl event, boolean cacheWrite, boolean lock, boolean callbackEvents) throws CacheWriterException, TimeoutException { preDestroyChecks(); HashSet eventSet = null; final TXStateProxy tx = this.cache.getTXMgr().internalSuspend(); try { boolean acquiredLock = false; if (lock) { try { acquireDestroyLock(); acquiredLock = true; } catch (CancelException e) { // ignore if(logger.isDebugEnabled()) { logger.debug("basicDestroyRegion: acquireDestroyLock failed due to cache closure, region = {}", getFullPath()); } } } try { // maintain destroy lock and TXStateInterface // I moved checkRegionDestroyed up out of the following // try block because it does not seem correct to deliver // a destroy event to the clients of the region was already // destroyed on the server. checkRegionDestroyed(false); boolean cancelledByCacheWriterException = false; // see bug 47736 try { // ensure that destroy events are dispatched
void basicDestroyRegion(RegionEventImpl event, boolean cacheWrite, boolean lock, boolean callbackEvents) throws CacheWriterException, TimeoutException { HashSet eventSet = null; final TXStateInterface tx = this.cache.getTxManager().internalSuspend(); try { boolean acquiredLock = false; if (lock) { try { acquireDestroyLock(); acquiredLock = true; } catch (CancelException e) { // ignore cache.getLogger().fine( "basicDestroyRegion: acquireDestroyLock failed due to cache closure, region = " + getFullPath()); } } try { // maintain destroy lock and TXStateInterface // I moved checkRegionDestroyed up out of the following // try block because it does not seem correct to deliver // a destroy event to the clients of the region was already // destroyed on the server. checkRegionDestroyed(false); boolean cancelledByCacheWriterException = false; // see bug 47736 try { // ensure that destroy events are dispatched if (this instanceof PartitionedRegion
super.basicDestroyRegion(event, cacheWrite, lock, callbackEvents);