@Override public void invalidate(Object key, Object aCallbackArgument) throws TimeoutException, EntryNotFoundException { checkReadiness(); checkForLimitedOrNoAccess(); validatedInvalidate(key, aCallbackArgument); }
/** * This implementation only checks readiness and scope */ @Override public Lock getRegionDistributedLock() throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException( "Only supported for GLOBAL scope, not LOCAL"); }
/** * This implementation only checks readiness and scope */ @Override public Lock getDistributedLock(Object key) throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException( "Only supported for GLOBAL scope, not LOCAL"); }
private DistributedRemoveAllOperation newRemoveAllOperation(Collection<?> keys, Object callbackArg) { if (keys == null) { throw new NullPointerException("The keys Collection passed to removeAll was null."); } if (keys.isEmpty()) { return null; } checkReadiness(); checkForLimitedOrNoAccess(); discoverJTA(); // Create a dummy event for the removeAll operation. Always create a // removeAll operation, even if there is no distribution, so that individual // events can be tracked and handed off to callbacks in postRemoveAll // No need for release since disallowOffHeapValues called. final EntryEventImpl event = EntryEventImpl.create(this, Operation.REMOVEALL_DESTROY, null, null, callbackArg, false, getMyId()); event.disallowOffHeapValues(); return new DistributedRemoveAllOperation(event, keys.size(), false); }
public DistributedPutAllOperation newPutAllOperation(Map<?, ?> map, Object callbackArg) { if (map == null) { throw new NullPointerException( "map cannot be null"); } if (map.isEmpty()) { return null; } checkReadiness(); checkForLimitedOrNoAccess(); discoverJTA(); // Create a dummy event for the PutAll operation. Always create a // PutAll operation, even if there is no distribution, so that individual // events can be tracked and handed off to callbacks in postPutAll // No need for release since disallowOffHeapValues called. final EntryEventImpl event = EntryEventImpl.create(this, Operation.PUTALL_CREATE, null, null, callbackArg, true, getMyId()); event.disallowOffHeapValues(); return new DistributedPutAllOperation(event, map.size(), false); }
@Override public void loadSnapshot(InputStream inputStream) throws CacheWriterException, TimeoutException, ClassNotFoundException, IOException { if (isProxy()) { throw new UnsupportedOperationException( String.format("Regions with DataPolicy %s do not support loadSnapshot.", getDataPolicy())); } if (inputStream == null) { throw new NullPointerException( "InputStream must not be null."); } checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOAD_SNAPSHOT, null, false, getMyId(), generateEventID()/* generate EventID */); reinitialize(inputStream, event); }
@Retained EntryEventImpl newDestroyEntryEvent(Object key, Object aCallbackArgument) { validateKey(key); checkReadiness(); checkForLimitedOrNoAccess(); return EntryEventImpl.create(this, Operation.DESTROY, key, null/* newValue */, aCallbackArgument, false, getMyId()); }
@Retained private EntryEventImpl newCreateEntryEvent(Object key, Object value, Object aCallbackArgument) { validateArguments(key, value, aCallbackArgument); checkReadiness(); checkForLimitedOrNoAccess(); return EntryEventImpl .create(this, Operation.CREATE, key, value, aCallbackArgument, false, getMyId()) /* to distinguish genuine create */.setCreate(true); }
@Override public void invalidateRegion(Object aCallbackArgument) throws TimeoutException { getDataView().checkSupportsRegionInvalidate(); checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_INVALIDATE, aCallbackArgument, false, getMyId(), generateEventID()); 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); }
@Retained EntryEventImpl newUpdateEntryEvent(Object key, Object value, Object aCallbackArgument) { validateArguments(key, value, aCallbackArgument); if (value == null) { throw new NullPointerException( "value must not be null"); } checkReadiness(); checkForLimitedOrNoAccess(); discoverJTA(); // This used to call the constructor which took the old value. It // was modified to call the other EntryEventImpl constructor so that // an id will be generated by default. Null was passed in anyway. // generate EventID @Retained final EntryEventImpl event = EntryEventImpl.create(this, Operation.UPDATE, key, value, aCallbackArgument, false, getMyId()); boolean eventReturned = false; try { extractDeltaIntoEvent(value, event); eventReturned = true; return event; } finally { if (!eventReturned) event.release(); } }
validateArguments(key, newValue, callbackArg); checkReadiness(); checkForLimitedOrNoAccess();
validateKey(key); checkReadiness(); checkForLimitedOrNoAccess();
checkForLimitedOrNoAccess(); discoverJTA();
try { r.checkReadiness(); r.checkForLimitedOrNoAccess(); r.basicInvalidate(event); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {