void rescheduleEntryExpiryTasks() { if (isProxy()) { return; } if (!isInitialized()) { return; // don't schedule expiration until region is initialized (bug } if (!isEntryExpiryPossible()) { return; } // OK to ignore transaction since Expiry only done non-tran Iterator<RegionEntry> it = this.entries.regionEntries().iterator(); if (it.hasNext()) { ExpiryTask.doWithNowSet(this, () -> { while (it.hasNext()) { addExpiryTask(it.next()); } }); } }
@Override public void loadSnapshot(InputStream inputStream) throws CacheWriterException, TimeoutException, ClassNotFoundException, IOException { if (isProxy()) { throw new UnsupportedOperationException( String.format("Regions with DataPolicy %s do not support loadSnapshot.", getDataPolicy())); } if (inputStream == null) { throw new NullPointerException( "InputStream must not be null."); } checkReadiness(); checkForLimitedOrNoAccess(); RegionEventImpl event = new RegionEventImpl(this, Operation.REGION_LOAD_SNAPSHOT, null, false, getMyId(), generateEventID()/* generate EventID */); reinitialize(inputStream, event); }
/** * Returns true if this region's config indicates that it will use a disk store. Added for bug * 42055. */ protected boolean usesDiskStore(RegionAttributes regionAttributes) { return !isProxy() && (getAttributes().getDataPolicy().withPersistence() || isOverflowEnabled()); }
@Override public void saveSnapshot(OutputStream outputStream) throws IOException { if (isProxy()) { throw new UnsupportedOperationException( String.format("Regions with DataPolicy %s do not support saveSnapshot.",
/** * Creates a RegionMap that is stored in the VM. * * @param owner the region that will be the owner of the map * @param attrs attributes used to create the map and its entries */ public static RegionMap createVM(LocalRegion owner, RegionMap.Attributes attrs, InternalRegionArguments internalRegionArgs) { // final boolean isNotPartitionedRegion = !(owner.getPartitionAttributes() != null || owner // .getDataPolicy().withPartitioning()); if (owner.isProxy() /* || owner instanceof PartitionedRegion */) { // TODO enabling this causes // eviction tests to fail return new ProxyRegionMap(owner, attrs, internalRegionArgs); } else if (owner.isEntryEvictionPossible()) { return new VMLRURegionMap(owner, attrs, internalRegionArgs); } else { return new VMRegionMap(owner, attrs, internalRegionArgs); } }
updateStatsForCreate(); if (!isProxy() && !clearConflict) { if (this.indexManager != null) { try {
if (this.statisticsEnabled && !isProxy()) {
private void addExpiryTask(RegionEntry regionEntry, boolean ifAbsent) { if (isProxy()) { return;
if (!isProxy()) { for (Object currentKey : list) { this.entries.initialImagePut(currentKey, 0, Token.LOCAL_INVALID, false, false, null, if (!isProxy()) { this.entries.initialImagePut(currentKey, 0, val, false, false, tag, null, false); if (!isProxy() && isKeyOnServer) { this.entries.initialImagePut(currentKey, 0, Token.LOCAL_INVALID, false, false, tag, null, false);
updateStatsForPut(entry, lastModifiedTime, lruRecentUse); if (!isProxy()) { if (!clearConflict && this.indexManager != null) { try {
if (!isProxy()) {