@Override public ClientRegionFactory<K, V> setEntryIdleTimeout(ExpirationAttributes idleTimeout) { this.attrsFactory.setEntryIdleTimeout(idleTimeout); return this; }
/** * Sets the idleTimeout expiration attributes for region entries for the next * {@code RegionAttributes} created. Note that the XML element that corresponds to this method * "entry-idle-time", does not include "out" in its name. * * @param idleTimeout the idleTimeout ExpirationAttributes for entries in this region * @return a reference to this RegionFactory object * @throws IllegalArgumentException if idleTimeout is null * @see AttributesFactory#setEntryIdleTimeout */ public RegionFactory<K, V> setEntryIdleTimeout(ExpirationAttributes idleTimeout) { this.attrsFactory.setEntryIdleTimeout(idleTimeout); return this; }
@Override public void run2() throws CacheException { RegionAttributes<?, ?> ra = getRegionAttributes(); AttributesFactory<?, ?> factory = new AttributesFactory<>(ra); final boolean partitioned = ra.getPartitionAttributes() != null || ra.getDataPolicy().withPartitioning(); // MUST be nonmirrored, so turn off persistBackup if this is a disk region test if (!partitioned) { if (ra.getEvictionAttributes() == null || !ra.getEvictionAttributes().getAction().isOverflowToDisk()) { factory.setDiskStoreName(null); } factory.setDataPolicy(DataPolicy.NORMAL); } factory.setStatisticsEnabled(true); ExpirationAttributes expire = new ExpirationAttributes(shortTimeout, ExpirationAction.DESTROY); factory.setEntryIdleTimeout(expire); System.setProperty(LocalRegion.EXPIRY_MS_PROPERTY, "true"); try { createRegion(name, factory.create()); } finally { System.getProperties().remove(LocalRegion.EXPIRY_MS_PROPERTY); } } });
@Override public void run2() throws CacheException { AttributesFactory<?, ?> factory = new AttributesFactory<>(getRegionAttributes()); factory.setStatisticsEnabled(true); ExpirationAttributes expire = new ExpirationAttributes(timeout, ExpirationAction.DESTROY); factory.setEntryIdleTimeout(expire); if (getRegionAttributes().getPartitionAttributes() != null) { createRegion(name, factory.create()); } else { createRegion(name); } } });
requestedFactory.setStatisticsEnabled(true); if (configuration.getCustomExpiry() == null) { requestedFactory.setEntryIdleTimeout( new ExpirationAttributes(maxInactiveInterval, ExpirationAction.DESTROY)); } else {
factory.setEntryIdleTimeout(expire); factory.setStatisticsEnabled(true); TestCacheListener list = new TestCacheListener() {
factory.setEntryIdleTimeout(expire); ExpirationAttributes expire2 = new ExpirationAttributes(0, ExpirationAction.INVALIDATE); factory.setCustomEntryIdleTimeout(new TestExpiry(key2, expire2));
factory.setEntryIdleTimeout(expire); factory.setStatisticsEnabled(true); TestCacheListener list = new TestCacheListener() {
public final <K, V> Region<K, V> createRegion(final String name, final String rootName, final RegionAttributes<K, V> attributes) throws CacheException { Region<K, V> root = getRootRegion(rootName); if (root == null) { // don't put listeners on root region AttributesFactory<K, V> attributesFactory = new AttributesFactory<>(attributes); ExpirationAttributes expiration = ExpirationAttributes.DEFAULT; attributesFactory.setCacheLoader(null); attributesFactory.setCacheWriter(null); attributesFactory.setPoolName(null); attributesFactory.setPartitionAttributes(null); attributesFactory.setRegionTimeToLive(expiration); attributesFactory.setEntryTimeToLive(expiration); attributesFactory.setRegionIdleTimeout(expiration); attributesFactory.setEntryIdleTimeout(expiration); RegionAttributes<K, V> rootAttrs = attributesFactory.create(); root = createRootRegion(rootName, rootAttrs); } return root.createSubregion(name, attributes); }
factory.setEntryIdleTimeout(expire1); factory.setStatisticsEnabled(true); TestCacheListener list = new TestCacheListener() {
ExpirationAttributes expireIdle = new ExpirationAttributes(timeout / 2, ExpirationAction.DESTROY); factory.setEntryIdleTimeout(expireIdle); ExpirationAttributes expireTtl = new ExpirationAttributes(timeout, ExpirationAction.DESTROY); factory.setEntryTimeToLive(expireTtl);
factory.setEntryIdleTimeout(expire); factory.setStatisticsEnabled(true); RegionAttributes attrs = factory.create();
factory.setEntryIdleTimeout(invalidate); factory.setStatisticsEnabled(true); factory.setEntryIdleTimeout(destroy); factory.setStatisticsEnabled(true); factory.setEntryIdleTimeout(destroy); factory.setStatisticsEnabled(true); factory.setEntryIdleTimeout(destroy); factory.setStatisticsEnabled(true); factory.setEntryIdleTimeout(destroy); factory.setStatisticsEnabled(false); try {
requestedFactory.setStatisticsEnabled(true); if (configuration.getCustomExpiry() == null) { requestedFactory.setEntryIdleTimeout( new ExpirationAttributes(maxInactiveInterval, ExpirationAction.DESTROY)); } else {