public void setUserAttribute(Object value) { checkReadiness(); this.regionUserAttribute = value; }
public Region getSubregion(String path) { checkReadiness(); return getSubregion(path, false, false); }
public Region getSubregion(String path) { checkReadiness(); return getSubregion(path, false); }
/** * Flavor of keys that will not do repeatable read * @since 5.5 */ public Set testHookKeys() { checkReadiness(); checkForNoAccess(); return new EntriesSet(this, false, IteratorType.KEYS, false /* allowTombstones */); }
public Set keys() { checkReadiness(); checkForNoAccess(); return new EntriesSet(this, false, IteratorType.KEYS, false); }
public Set entries(boolean recursive) { checkReadiness(); checkForNoAccess(); return basicEntries(recursive); }
/** * Flavor of keys that will not do repeatable read * @since 5.5 */ public Set testHookKeys() { checkReadiness(); checkForNoAccess(); return new EntriesSet(this, false, IteratorType.KEYS, false /* dontRememberReads */, false /* skipTxCheckInIteration */, false /* allowTombstones */); }
public Set entries(boolean recursive) { checkReadiness(); checkForNoAccess(); return basicEntries(recursive); }
/** * return a set of the keys in this region * @param allowTombstones whether destroyed entries should be included * @return the keys */ public Set keySet(boolean allowTombstones) { checkReadiness(); checkForNoAccess(); return new EntriesSet(this, false, IteratorType.KEYS, allowTombstones); }
public Collection values() { checkReadiness(); checkForNoAccess(); return new EntriesSet(this, false, IteratorType.VALUES, false); }
public boolean containsKeyOnServer(Object key) { checkReadiness(); checkForNoAccess(); ServerRegionProxy proxy = getServerProxy(); if (proxy != null) { return proxy.containsKey(key); } else { throw new UnsupportedOperationException(LocalizedStrings.LocalRegion_SERVER_KEYSET_REQUIRES_A_POOL.toLocalizedString()); } }
public boolean containsKey(Object key, Object callbackArg) { checkReadiness(); checkForNoAccess(); return getDataView().containsKey(key, callbackArg, this); }
/** * 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 boolean containsKey(Object key) { checkReadiness(); checkForNoAccess(); return getDataView().containsKey(getKeyInfo(key), this); }
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 void localInvalidateRegion(Object aCallbackArgument) { getDataView().checkSupportsRegionInvalidate(); checkReadiness(); checkForNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOCAL_INVALIDATE, aCallbackArgument, false, getMyId()); basicInvalidateRegion(event); }
@Released protected void setValue(RegionEntryContext context, @Unretained Object value, boolean recentlyUsed) { _setValue(value); if (value != null && context != null && (this instanceof OffHeapRegionEntry) && context instanceof LocalRegion && ((LocalRegion)context).isThisRegionBeingClosedOrDestroyed()) { ((OffHeapRegionEntry)this).release(); ((LocalRegion)context).checkReadiness(); } if (recentlyUsed) { setRecentlyUsed(); } }
public final RegionEntry putEntryIfAbsent(Object key, RegionEntry re) { RegionEntry value = (RegionEntry)_getMap().putIfAbsent(key, re); if (value == null && (re instanceof OffHeapRegionEntry) && _isOwnerALocalRegion() && _getOwner().isThisRegionBeingClosedOrDestroyed()) { // prevent orphan during concurrent destroy (#48068) if (_getMap().remove(key, re)) { ((OffHeapRegionEntry)re).release(); } _getOwner().checkReadiness(); // throw RegionDestroyedException } return value; }
public final RegionEntry putEntryIfAbsent(Object key, RegionEntry re) { RegionEntry value = (RegionEntry)_getMap().putIfAbsent(key, re); if (value == null && re.isOffHeap() && _isOwnerALocalRegion() && _getOwner().isThisRegionBeingClosedOrDestroyed()) { // prevent orphan during concurrent destroy (#48068) if (_getMap().remove(key, re)) { ((OffHeapRegionEntry)re).release(); } _getOwner().checkReadiness(); // throw RegionDestroyedException } return value; }