TXEntry(LocalRegion localRegion, KeyInfo key, TXStateInterface tx, boolean rememberReads) { this.localRegion = localRegion; this.localRegion.validateKey(key.getKey()); this.keyInfo = key; this.myTX = tx; this.rememberReads = rememberReads; //Assert that these contructors are invoked only // via factory path. I am not able to make them private // because SqlfabricTxEntry needs extending TxEntry /*if(logger.isDebugEnabled()) { StackTraceElement[] traces =Thread.currentThread().getStackTrace(); //The third element should be the factory one StackTraceElement trace = traces[2]; Assert.assertTrue(TxEntryFactory.class.isAssignableFrom(trace.getClass())); Assert.assertTrue(trace.getMethodName().equals("createEntry")); }*/ }
protected final void validateArguments(Object key, Object value, Object aCallbackArgument) { validateKey(key); validateValue(value); validateCallbackArg(aCallbackArgument); }
protected void validateArguments(Object key, Object value, Object aCallbackArgument) { validateKey(key); validateValue(value); validateCallbackArg(aCallbackArgument); }
public Region.Entry getEntry(Object key, final TXStateInterface tx) { validateKey(key); checkReadiness(); checkForNoAccess(); return getDataView(tx).getEntry(key, null, this, false); }
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 newDestroyEntryEvent(Object key, Object aCallbackArgument) { validateKey(key); validateCallbackArg(aCallbackArgument); checkReadiness(); checkForLimitedOrNoAccess(); return EntryEventImpl.create(this, Operation.DESTROY, key, null/* newValue */, aCallbackArgument, false, getMyId()); }
validateKey(key); EntryEventImpl event = EntryEventImpl.create(this, Operation.LOCAL_DESTROY, key, false, getMyId(), false /* generateCallbacks */, true);
public Region.Entry getEntry(Object key) { validateKey(key); checkReadiness(); checkForNoAccess(); discoverJTA(); return getDataView().getEntry(getKeyInfo(key), this, false); }
/** * Just like getEntry but also updates the stats that get would have depending * on a flag. See bug 42410. Also skips discovering JTA * * @param key * @return the entry if it exists; otherwise null. */ public Region.Entry<?, ?> accessEntry(final Object key, final TXStateInterface tx, boolean updateStats) { validateKey(key); checkReadiness(); checkForNoAccess(); if(updateStats) { return getDataView(tx).accessEntry(key, null, this); } else { return getDataView(tx).getEntry(key, null, this, false); } }
public void localDestroy(Object key, Object aCallbackArgument) throws EntryNotFoundException { validateKey(key); checkReadiness(); checkForNoAccess(); EntryEventImpl event = EntryEventImpl.create( this, Operation.LOCAL_DESTROY, key, null, aCallbackArgument, false, getMyId()); if (generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } try { basicDestroy(event, false, null); // expectedOldValue } catch (CacheWriterException e) { // cache writer not called throw new Error(LocalizedStrings.LocalRegion_CACHE_WRITER_SHOULD_NOT_HAVE_BEEN_CALLED_FOR_LOCALDESTROY.toLocalizedString(), e); } catch (TimeoutException e) { // no distributed lock throw new Error(LocalizedStrings.LocalRegion_NO_DISTRIBUTED_LOCK_SHOULD_HAVE_BEEN_ATTEMPTED_FOR_LOCALDESTROY.toLocalizedString(), e); } finally { event.release(); } }
public void localDestroy(Object key, Object aCallbackArgument) throws EntryNotFoundException { validateKey(key); checkReadiness(); checkForNoAccess(); EntryEventImpl event = EntryEventImpl.create(this, Operation.LOCAL_DESTROY, key, null, aCallbackArgument, false, getMyId()); if (generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } try { basicDestroy(event, false, null); // expectedOldValue } catch (CacheWriterException e) { // cache writer not called throw new Error(LocalizedStrings.LocalRegion_CACHE_WRITER_SHOULD_NOT_HAVE_BEEN_CALLED_FOR_LOCALDESTROY.toLocalizedString(), e); } catch (TimeoutException e) { // no distributed lock throw new Error(LocalizedStrings.LocalRegion_NO_DISTRIBUTED_LOCK_SHOULD_HAVE_BEEN_ATTEMPTED_FOR_LOCALDESTROY.toLocalizedString(), e); } finally { event.release(); } }
/** * Just like getEntry but also updates the stats that get would have depending * on a flag. See bug 42410. Also skips discovering JTA * * @param key * @return the entry if it exists; otherwise null. */ public Entry accessEntry(Object key, boolean updateStats) { validateKey(key); checkReadiness(); checkForNoAccess(); if(updateStats) { return getDataView().accessEntry(getKeyInfo(key), this); } else { return getDataView().getEntry(getKeyInfo(key), this, false); } }
validateKey(key); EntryEventImpl event = EntryEventImpl.create(this, Operation.LOCAL_DESTROY, key, false, getMyId(), false /* generateCallbacks */, true);
public void localInvalidate(Object key, Object callbackArgument) throws EntryNotFoundException { validateKey(key); checkReadiness(); checkForNoAccess(); EntryEventImpl event = EntryEventImpl.create( this, Operation.LOCAL_INVALIDATE, key, null/* newValue */, callbackArgument, false, getMyId()); try { if (generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } event.setLocalInvalid(true); basicInvalidate(event); } finally { event.release(); } }
public void localInvalidate(Object key, Object callbackArgument) throws EntryNotFoundException { validateKey(key); checkReadiness(); checkForNoAccess(); EntryEventImpl event = EntryEventImpl.create( this, Operation.LOCAL_INVALIDATE, key, null/* newValue */, callbackArgument, false, getMyId()); try { operationStart(); if (generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } event.setLocalInvalid(true); basicInvalidate(event); } finally { event.release(); operationCompleted(); } }
assert op != null; checkReadiness(); validateKey(key); EntryEventImpl event = EntryEventImpl.createRemoveAllEvent(op, this, key); try {
Object value = pvalue; checkIfConcurrentMapOpsAllowed(); validateKey(key); validateCallbackArg(callbackArg); checkReadiness();
Object value = pvalue; checkIfConcurrentMapOpsAllowed(); validateKey(key); validateCallbackArg(callbackArg); checkReadiness();
EntryEventImpl clientEvent, boolean returnTombstones, boolean allowReadFromHDFS) throws TimeoutException, CacheLoaderException { validateKey(key); validateCallbackArg(aCallbackArgument); checkReadiness();
validateKey(key); validateCallbackArg(aCallbackArgument); checkReadiness();