public static NonLocalRegionEntry newEntry() { final StaticSystemCallbacks sysCb = FactoryStatics.systemCallbacks; if (sysCb == null) { return new NonLocalRegionEntry(); } else { return sysCb.newNonLocalRegionEntry(); } }
public static NonLocalRegionEntry newEntry(RegionEntry re, LocalRegion region, boolean allowTombstones) { final StaticSystemCallbacks sysCb = FactoryStatics.systemCallbacks; if (sysCb == null) { return new NonLocalRegionEntry(re, region, allowTombstones); } else { return sysCb.newNonLocalRegionEntry(re, region, allowTombstones); } }
public static NonLocalRegionEntry newEntryWithoutFaultIn(RegionEntry re, LocalRegion region, boolean allowTombstones) { final StaticSystemCallbacks sysCb = FactoryStatics.systemCallbacks; if (sysCb == null) { return new NonLocalRegionEntry(re, region, allowTombstones, false); } else { return sysCb.newNonLocalRegionEntry(re, region, allowTombstones, false); } }
public static NonLocalRegionEntry newEntry(Object key, Object value, LocalRegion region, VersionTag<?> versionTag) { final StaticSystemCallbacks sysCb = FactoryStatics.systemCallbacks; if (sysCb == null) { return new NonLocalRegionEntry(key, value, region, versionTag); } else { return sysCb.newNonLocalRegionEntry(key, value, region, versionTag); } }
public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.startedLocal = false; boolean hasStats = in.readBoolean(); if (hasStats) { this.regionEntry = new NonLocalRegionEntryWithStats(); } else { this.regionEntry = new NonLocalRegionEntry(); } this.regionEntry.fromData(in); }
/** * creates a new Entry that wraps the given RegionEntry object for the given * storage Region * @param allowTombstones TODO */ public EntrySnapshot(RegionEntry regionEntry, LocalRegion dataRegion,LocalRegion region, boolean allowTombstones) { this.region = region; if (regionEntry instanceof NonLocalRegionEntry) { this.regionEntry = (NonLocalRegionEntry)regionEntry; this.startedLocal = false; } else { this.startedLocal = true; // note we always make these non-local now to handle PR buckets moving // out from under this Region.Entry. if (regionEntry.hasStats()) { this.regionEntry = new NonLocalRegionEntryWithStats(regionEntry, dataRegion, allowTombstones); } else { this.regionEntry = new NonLocalRegionEntry(regionEntry, dataRegion, allowTombstones); } } }
@Override public void getValueAndIsObject(Region p_region, Object key, Object callbackArg, ServerConnection servConn, Object[] result) { Object data = null; LocalRegion region = (LocalRegion) p_region; Entry entry = region.getEntry(key); if (logger.isDebugEnabled()) { logger.debug("GetEntryCommand: for key: {} returning entry: {}", key, entry); } if (entry != null) { EntrySnapshot snap = new EntrySnapshot(); NonLocalRegionEntry re = new NonLocalRegionEntry(entry, region); snap.setRegionEntry(re); snap.setRegion(region); data = snap; } result[0] = data; result[1] = true; // isObject is true } }
@Override public Get70.Entry getValueAndIsObject(Region region, Object key, Object callbackArg, ServerConnection servConn) { LocalRegion lregion = (LocalRegion)region; Object data = null; Region.Entry entry = region.getEntry(key); if (logger.isDebugEnabled()) { logger.debug("GetEntryCommand: for key: {} returning entry: {}", key, entry); } VersionTag tag = null; if (entry != null) { EntrySnapshot snap = new EntrySnapshot(); NonLocalRegionEntry re = new NonLocalRegionEntry(entry, lregion); snap.setRegionEntry(re); snap.setRegion(lregion); data = snap; tag = snap.getVersionTag(); } Get70.Entry result = new Get70.Entry(); result.value = data; result.isObject = true; result.keyNotPresent = false; result.versionTag = tag; return result; } }
public Entry getEntryOnRemote(KeyInfo key, LocalRegion localRegion, boolean allowTombstones) throws DataLocationException { PartitionedRegion pr = (PartitionedRegion)localRegion; Region.Entry txval = getEntry(key, pr, allowTombstones); if(txval==null) { throw new EntryNotFoundException(LocalizedStrings.PartitionedRegionDataStore_ENTRY_NOT_FOUND.toLocalizedString()); } else { NonLocalRegionEntry nlre = new NonLocalRegionEntry(txval, localRegion); LocalRegion dataReg = localRegion.getDataRegionForRead(key); return new EntrySnapshot(nlre,dataReg,(LocalRegion)txval.getRegion(), allowTombstones); } }
r.checkEntryNotFound(key); NonLocalRegionEntry nlre = new NonLocalRegionEntry(re, r); LocalRegion dataReg = r.getDataRegionForRead(keyInfo); val = new EntrySnapshot(nlre,dataReg,r, false);