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 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); }
@Override public int hashCode() { return this.regionEntry.getKey().hashCode(); }
public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.startedLocal = false; boolean hasStats = in.readBoolean(); if (hasStats) { this.regionEntry = NonLocalRegionEntryWithStats.newEntry(); } else { this.regionEntry = NonLocalRegionEntry.newEntry(); } this.regionEntry.fromData(in); } }
oldRe = NonLocalRegionEntry.newEntryWithoutFaultIn(re, event.getRegion(), true); oldRe.setUpdateInProgress(true); final int valueSize = memoryValue != null && oldSize > 0 ? oldSize : _getOwner().calculateValueSize(oldRe._getValue()); oldRe.setValueSize(valueSize); oldRe.setForDelete(); _getOwner().getCache().addOldEntry(oldRe, re, _getOwner(), event); oldRe.setUpdateInProgress(false);
public void toData(DataOutput out) throws IOException { out.writeBoolean(this.regionEntry instanceof NonLocalRegionEntryWithStats); this.regionEntry.toData(out); }
public CacheStatistics getStatistics() throws StatisticsDisabledException { checkEntryDestroyed(); if (!regionEntry.hasStats() || !region.statisticsEnabled) { throw new StatisticsDisabledException(LocalizedStrings.PartitionedRegion_STATISTICS_DISABLED_FOR_REGION_0.toLocalizedString(region.getFullPath())); } return new CacheStatisticsImpl(this.regionEntry, region); }
public Object setValue(Object arg) { Object returnValue = region.put(this.getKey(), arg); this.regionEntry.setCachedValue(arg); return returnValue; }
public VersionTag getVersionTag() { VersionStamp stamp = regionEntry.getVersionStamp(); if (stamp != null) { return stamp.asVersionTag(); } return null; }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.lastAccessed = in.readLong(); this.hitCount = in.readLong(); this.missCount = in.readLong(); } }
public boolean isDestroyed() { if (this.entryDestroyed) { return true; } if (region.isDestroyed()) { this.entryDestroyed = true; } else if (this.regionEntry.isRemoved()) { this.entryDestroyed = true; } // else the entry is somewhere else and we don't know if it's destroyed return this.entryDestroyed; }
public Object getRawValue() { Object v = this.regionEntry.getValue(null); if (v == null) { return null; } if (v instanceof CachedDeserializable) { if (region.isCopyOnRead()) { v = ((CachedDeserializable)v).getDeserializedWritableCopy(null, null); } else { v = ((CachedDeserializable)v).getDeserializedValue(null, null); } if (v == Token.INVALID || v == Token.LOCAL_INVALID) { v = null; } } else { if (v == Token.INVALID || v == Token.LOCAL_INVALID) { v = null; } else { v = conditionalCopy(v); } } return v; }
oldRe = NonLocalRegionEntry.newEntryWithoutFaultIn(re, event.getRegion(), true); valueSize = memoryValue != null && oldSize > 0 ? oldSize : region.calculateValueSize(oldRe._getValue()); oldRe.setUpdateInProgress(true); oldRe.setValueSize(valueSize); checkConflict(owner, event, re); } finally { if (oldRe != null) { oldRe.setUpdateInProgress(false);
public void toData(DataOutput out) throws IOException { out.writeBoolean(this.regionEntry instanceof NonLocalRegionEntryWithStats); this.regionEntry.toData(out); }
public CacheStatistics getStatistics() throws StatisticsDisabledException { checkEntryDestroyed(); if (!regionEntry.hasStats() || !region.statisticsEnabled) { throw new StatisticsDisabledException(LocalizedStrings.PartitionedRegion_STATISTICS_DISABLED_FOR_REGION_0.toLocalizedString(region.getFullPath())); } return new CacheStatisticsImpl(this.regionEntry, region); }
public Object setValue(Object arg) { Object returnValue = region.put(this.getKey(), arg); this.regionEntry.setCachedValue(arg); return returnValue; }
public VersionTag getVersionTag() { VersionStamp stamp = regionEntry.getVersionStamp(); if (stamp != null) { return stamp.asVersionTag(); } return null; }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.lastAccessed = in.readLong(); this.hitCount = in.readLong(); this.missCount = in.readLong(); } }
public boolean isDestroyed() { if (this.entryDestroyed) { return true; } if (region.isDestroyed()) { this.entryDestroyed = true; } else if (this.regionEntry.isRemoved()) { this.entryDestroyed = true; } // else the entry is somewhere else and we don't know if it's destroyed return this.entryDestroyed; }
public Object getRawValue() { Object v = this.regionEntry.getValue(null); if (v == null) { return null; } if (v instanceof CachedDeserializable) { if (region.isCopyOnRead()) { v = ((CachedDeserializable)v).getDeserializedWritableCopy(null, null); } else { v = ((CachedDeserializable)v).getDeserializedValue(null, null); } if (v == Token.INVALID || v == Token.LOCAL_INVALID) { v = null; } } else { if (v == Token.INVALID || v == Token.LOCAL_INVALID) { v = null; } else { v = conditionalCopy(v); } } return v; }