public void invalidate(Object key, Object aCallbackArgument) throws TimeoutException, EntryNotFoundException { checkReadiness(); checkForLimitedOrNoAccess(); validatedInvalidate(key, aCallbackArgument); }
/** * This implementation only checks readiness and scope */ public Lock getDistributedLock(Object key) throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException(LocalizedStrings.LocalRegion_ONLY_SUPPORTED_FOR_GLOBAL_SCOPE_NOT_LOCAL.toLocalizedString()); }
/** * This implementation only checks readiness and scope */ public Lock getDistributedLock(Object key) throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException(LocalizedStrings.LocalRegion_ONLY_SUPPORTED_FOR_GLOBAL_SCOPE_NOT_LOCAL.toLocalizedString()); }
/** * This implementation only checks readiness and scope */ public Lock getRegionDistributedLock() throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException(LocalizedStrings.LocalRegion_ONLY_SUPPORTED_FOR_GLOBAL_SCOPE_NOT_LOCAL.toLocalizedString()); }
/** * This implementation only checks readiness and scope */ public Lock getRegionDistributedLock() throws IllegalStateException { checkReadiness(); checkForLimitedOrNoAccess(); Scope theScope = getAttributes().getScope(); Assert.assertTrue(theScope == Scope.LOCAL); throw new IllegalStateException(LocalizedStrings.LocalRegion_ONLY_SUPPORTED_FOR_GLOBAL_SCOPE_NOT_LOCAL.toLocalizedString()); }
public final 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 final EntryEventImpl event = EntryEventImpl.create(this, Operation.REMOVEALL_DESTROY, null, null/* newValue */, callbackArg, false, getMyId()); event.disallowOffHeapValues(); return new DistributedRemoveAllOperation(event, keys.size(), false); }
public void invalidate(Object key, Object aCallbackArgument) throws TimeoutException, EntryNotFoundException { try{ operationStart(); checkReadiness(); checkForLimitedOrNoAccess(); validatedInvalidate(key, aCallbackArgument); } finally { operationCompleted(); } }
public final DistributedPutAllOperation newPutAllOperation(Map<?, ?> map, Object callbackArg) { if (map == null) { throw new NullPointerException(LocalizedStrings .AbstractRegion_MAP_CANNOT_BE_NULL.toLocalizedString()); } 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 final EntryEventImpl event = EntryEventImpl.create(this, Operation.PUTALL_CREATE, null, null, callbackArg, true, getMyId()); event.disallowOffHeapValues(); DistributedPutAllOperation dpao = new DistributedPutAllOperation(event, map.size(), false); return dpao; } public final DistributedPutAllOperation newPutAllForPUTDmlOperation(Map<?, ?> map, Object callbackArg) {
public final 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); }
public final EntryEventImpl newDestroyEntryEvent(Object key, Object aCallbackArgument) { validateKey(key); validateCallbackArg(aCallbackArgument); checkReadiness(); checkForLimitedOrNoAccess(); return EntryEventImpl.create(this, Operation.DESTROY, key, null/* newValue */, aCallbackArgument, false, getMyId()); }
public final 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); }
public final EntryEventImpl newDestroyEntryEvent(Object key, Object aCallbackArgument) { validateKey(key); validateCallbackArg(aCallbackArgument); checkReadiness(); checkForLimitedOrNoAccess(); return EntryEventImpl.create(this, Operation.DESTROY, key, null/* newValue */, aCallbackArgument, false, getMyId()); }
public final DistributedPutAllOperation newPutAllOperation(Map<?, ?> map) { if (map == null) { throw new NullPointerException(LocalizedStrings .AbstractRegion_MAP_CANNOT_BE_NULL.toLocalizedString()); } if (map.isEmpty()) { return null; } checkReadiness(); checkForLimitedOrNoAccess(); final TXStateInterface tx = 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 final EntryEventImpl event = EntryEventImpl.create(this, Operation.PUTALL_CREATE, null, null, null, true, getMyId()); event.disallowOffHeapValues(); event.setTXState(tx); return new DistributedPutAllOperation(this, event, map.size(), false); }
public void loadSnapshot(InputStream inputStream) throws CacheWriterException, TimeoutException, ClassNotFoundException, IOException { if (isProxy()) { throw new UnsupportedOperationException(LocalizedStrings.LocalRegion_REGIONS_WITH_DATAPOLICY_0_DO_NOT_SUPPORT_LOADSNAPSHOT.toLocalizedString(getDataPolicy())); } if (inputStream == null) { throw new NullPointerException(LocalizedStrings.LocalRegion_INPUTSTREAM_MUST_NOT_BE_NULL.toLocalizedString()); } checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOAD_SNAPSHOT, null, false, getMyId(), generateEventID()/* generate EventID */); reinitialize(inputStream, event); }
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); }
public void loadSnapshot(InputStream inputStream) throws CacheWriterException, TimeoutException, ClassNotFoundException, IOException { if (isProxy()) { throw new UnsupportedOperationException(LocalizedStrings.LocalRegion_REGIONS_WITH_DATAPOLICY_0_DO_NOT_SUPPORT_LOADSNAPSHOT.toLocalizedString(getDataPolicy())); } if (inputStream == null) { throw new NullPointerException(LocalizedStrings.LocalRegion_INPUTSTREAM_MUST_NOT_BE_NULL.toLocalizedString()); } checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOAD_SNAPSHOT, null, false, getMyId(), generateEventID()/* generate EventID */); reinitialize(inputStream, event); }
public final EntryEventImpl newUpdateEntryEvent(Object key, Object value, Object aCallbackArgument) { validateArguments(key, value, aCallbackArgument); if (value == null) { throw new NullPointerException(LocalizedStrings .LocalRegion_VALUE_MUST_NOT_BE_NULL.toLocalizedString()); } checkReadiness(); checkForLimitedOrNoAccess(); // 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 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(); } }
public void invalidateRegion(Object aCallbackArgument) throws TimeoutException { getDataView().checkSupportsRegionInvalidate(); validateCallbackArg(aCallbackArgument); checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_INVALIDATE, aCallbackArgument, false, getMyId(), generateEventID()); basicInvalidateRegion(event); }
public void invalidateRegion(Object aCallbackArgument) throws TimeoutException { getDataView().checkSupportsRegionInvalidate(); validateCallbackArg(aCallbackArgument); checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_INVALIDATE, aCallbackArgument, false, getMyId(), generateEventID()); basicInvalidateRegion(event); }