@Override public Object getKeyForIterator(KeyInfo curr, LocalRegion currRgn, boolean allowTombstones) { // do not perform a value check here, it will send out an // extra message. Also BucketRegion will check to see if // the value for this key is a removed token return curr.getKey(); }
public Object getKeyForIterator(KeyInfo keyInfo, LocalRegion currRgn, boolean rememberReads, boolean allowTombstones) { return keyInfo.getKey(); }
@Override public Object getKeyForIterator(KeyInfo curr, LocalRegion currRgn, boolean rememberReads, boolean allowTombstones) { // do not perform a value check here, it will send out an // extra message. Also BucketRegion will check to see if // the value for this key is a removed token return curr.getKey(); }
public Object getKey() { checkEntryDestroyed(); return this.keyInfo.getKey(); }
/** * @see #basicGetEntry(Object) */ protected RegionEntry basicGetTXEntry(KeyInfo keyInfo) { return basicGetEntry(keyInfo.getKey()); }
public Object getKeyForIterator(KeyInfo curr, LocalRegion currRgn, boolean rememberReads, boolean allowTombstones) { if (!readEntryAndCheckIfDestroyed(curr, currRgn, rememberReads)) { return curr.getKey(); } else { return null; } }
@Override public int hashCode() { return this.keyInfo.getKey().hashCode() ^ this.getRegion().hashCode(); }
private void checkEntryDestroyed() { if (isDestroyed()) { throw new EntryDestroyedException(this.keyInfo.getKey().toString()); } }
protected Region.Entry<?, ?> txGetEntryForIterator(KeyInfo keyInfo, boolean access, final TXStateInterface tx, boolean allowTombstones) { final RegionEntry re = (RegionEntry)keyInfo.getKey(); return txGetEntry(re, re.getKey(), access, tx, allowTombstones); }
public Object findObject(KeyInfo keyInfo, boolean isCreate, boolean generateCallbacks, Object value, boolean preferCD, ClientProxyMembershipID requestingClient, EntryEventImpl event, boolean allowReadFromHDFS) { return proxy.get(keyInfo.getKey(), keyInfo.getCallbackArg(), event); }
protected final TXEntryUserAttrState txWriteUA(KeyInfo ki) { TXRegionState txr = myTX.txWriteRegion(this.localRegion, ki); if (txr != null) { return txr.writeEntryUserAttr(ki.getKey(), this.localRegion); } else { return null; } }
/** * @param keyInfo * @param access * true if caller wants last accessed time updated * @return TODO */ protected Region.Entry<?, ?> txGetEntry(KeyInfo keyInfo, boolean access, final TXStateInterface tx, boolean allowTombstones) { final Object key = keyInfo.getKey(); final RegionEntry re = this.entries.getEntry(key); return txGetEntry(re, key, access, tx, allowTombstones); }
public Object getKeyForIterator(final KeyInfo keyInfo, final LocalRegion currRgn, boolean rememberReads, boolean allowTombstones) { final AbstractRegionEntry re = (AbstractRegionEntry)keyInfo.getKey(); // fix for 42182, before returning a key verify that its value // is not a removed token if (re != null && (!re.isDestroyedOrRemoved() || (allowTombstones && re.isTombstone()) )) { return re.getKey(); } return null; }
@Override public Object next() { this.key.setKey(super.next()); this.key.setBucketId(this.currentBucketId); Object entry = view.getEntryForIterator(this.key, PartitionedRegion.this, allowTombstones); return entry != null ? entry : new DestroyedEntry(key.getKey().toString()); } }
@Override public Object next() { this.key.setKey(super.next()); this.key.setBucketId(this.currentBucketId); Object entry = view.getEntryForIterator(this.key, PartitionedRegion.this, true, allowTombstones); return entry != null ? entry : new DestroyedEntry(key.getKey().toString()); } }
@Unretained public Object getValue() { checkTX(); // Object value = this.localRegion.getDeserialized(this.key, false, this.myTX, this.rememberReads); @Unretained Object value = this.myTX.getDeserializedValue(keyInfo, this.localRegion, false, false, false, null, false, false, false); if (value == null) { throw new EntryDestroyedException(this.keyInfo.getKey().toString()); } else if (Token.isInvalid(value)) { return null; } return value; }
public Object getUserAttribute() { checkTX(); throwIfUAOperationForPR(); TXEntryUserAttrState tx = txReadUA(this.keyInfo); if (tx != null) { return tx.getPendingValue(); } else { checkEntryDestroyed(); return this.localRegion.basicGetEntryUserAttribute(this.keyInfo.getKey()); } }
public boolean containsKey(KeyInfo keyInfo) { try { RemoteContainsKeyValueResponse response = RemoteContainsKeyValueMessage.send((InternalDistributedMember)state.getTarget(), region, keyInfo.getKey(), false); return response.waitForContainsResult(); } catch (RegionDestroyedException rde) { throw new TransactionDataNotColocatedException(LocalizedStrings.RemoteMessage_REGION_0_NOT_COLOCATED_WITH_TRANSACTION .toLocalizedString(rde.getRegionFullPath()), rde); } catch(RemoteOperationException roe) { throw new TransactionDataNodeHasDepartedException(roe); } }
public boolean containsValueForKey(KeyInfo keyInfo) { try { RemoteContainsKeyValueResponse response = RemoteContainsKeyValueMessage.send((InternalDistributedMember)state.getTarget(), region, keyInfo.getKey(), true); return response.waitForContainsResult(); } catch (RegionDestroyedException rde) { throw new TransactionDataNotColocatedException(LocalizedStrings.RemoteMessage_REGION_0_NOT_COLOCATED_WITH_TRANSACTION .toLocalizedString(rde.getRegionFullPath()), rde); } catch(RemoteOperationException roe) { throw new TransactionDataNodeHasDepartedException(roe); } }