assertThat(rgn.getEntry("key").getValue()).isEqualTo("value2"); txMgr.commit(); assertThat(rgn.getEntry("key").getValue()).isEqualTo("value2"); assertThat(rgn.getEntry("key").getValue()).isEqualTo("value1"); txMgr.begin(); myTXId = txMgr.getTransactionId(); assertThat(rgn.containsKey("key")).isTrue(); assertThat(rgn.containsValueForKey("key")).isFalse(); assertThat(rgn.getEntry("key").getValue()).isNull(); localTl.assertCounts(3, 0, 0, 0); assertThat(rgn.getEntry("key").getValue()).isEqualTo("value2"); txMgr.commit(); assertThat(rgn.getEntry("key").getValue()).isEqualTo("value2"); localTl.assertCounts(5, 0, 0, 0);
public RemoteEntrySnapshot(Region.Entry entry, boolean statsEnabled) throws CacheException { Object entryName = entry.getKey(); if (entryName instanceof String || entryName instanceof Number) { name = entryName; } else { name = new RemoteObjectName(entryName); } Object val = entry.getValue(); if (val != null) { this.value = val.getClass().getName() + "\"" + val.toString() + "\""; } else { this.value = null; } Object attr = entry.getUserAttribute(); if (attr != null) { this.userAttribute = attr.getClass().getName() + "\"" + attr.toString() + "\""; } else { this.userAttribute = null; } if (statsEnabled) { this.stats = new RemoteCacheStatistics(entry.getStatistics()); } else { this.stats = new RemoteCacheStatistics(); } }
/** * Determines whether the Region Entry has been annotated with the TimeToLiveExpiration Annotation. * * @param entry the Region.Entry to evaluate for the presence of the TimeToLiveExpiration Annotation. * @return a boolean value indicating whether the Region Entry has been annotated with @TimeToLiveExpiration. * @see TimeToLiveExpiration * @see #isAnnotationPresent(Object, Class) */ protected boolean isTimeToLiveConfigured(Region.Entry<K, V> entry) { return entry != null && isTimeToLiveConfigured(entry.getValue()); }
/** * Determines whether the Region Entry has been annotated with the IdleTimeoutExpiration Annotation. * * @param entry the Region.Entry to evaluate for the presence of the IdleTimeoutExpiration Annotation. * @return a boolean value indicating whether the Region Entry has been annotated with @IdleTimeoutExpiration. * @see IdleTimeoutExpiration * @see #isAnnotationPresent(Object, Class) */ protected boolean isIdleTimeoutConfigured(Region.Entry<K, V> entry) { return entry != null && isIdleTimeoutConfigured(entry.getValue()); }
/** * Gets the Expiration Annotation meta-data from the Region Entry. * * @param entry the Region.Entry from which to extract the Expiration Annotation meta-data. * @return the Expiration Annotation meta-data for the given Region Entry or {@code null} * if the Region Entry has not been annotated with @Expiration. * @see Expiration * @see #getAnnotation(Object, Class) */ protected Expiration getExpiration(Region.Entry<K, V> entry) { return getExpiration(entry.getValue()); }
/** * Determines whether the Region Entry has been annotated with the IdleTimeoutExpiration Annotation. * * @param entry the Region.Entry to evaluate for the presence of the IdleTimeoutExpiration Annotation. * @return a boolean value indicating whether the Region Entry has been annotated with @IdleTimeoutExpiration. * @see IdleTimeoutExpiration * @see #isAnnotationPresent(Object, Class) */ protected boolean isIdleTimeoutConfigured(Region.Entry<K, V> entry) { return entry != null && isIdleTimeoutConfigured(entry.getValue()); }
/** * Gets the Expiration Annotation meta-data from the Region Entry. * * @param entry the Region.Entry from which to extract the Expiration Annotation meta-data. * @return the Expiration Annotation meta-data for the given Region Entry or {@code null} * if the Region Entry has not been annotated with @Expiration. * @see Expiration * @see #getAnnotation(Object, Class) */ protected Expiration getExpiration(Region.Entry<K, V> entry) { return getExpiration(entry.getValue()); }
/** * Determines whether the Region Entry has been annotated with the Expiration Annotation. * * @param entry the Region.Entry to evaluate for the presence of the Expiration Annotation. * @return a boolean value indicating whether the Region Entry has been annotated with @Expiration. * @see Expiration * @see #isAnnotationPresent(Object, Class) */ protected boolean isExpirationConfigured(Region.Entry<K, V> entry) { return entry != null && isExpirationConfigured(entry.getValue()); }
/** * Gets the IdleTimeoutExpiration Annotation meta-data from the Region Entry. * * @param entry the Region.Entry from which to extract the IdleTimeoutExpiration Annotation meta-data. * @return the IdleTimeoutExpiration Annotation meta-data for the given Region Entry or {@code null} * if the Region Entry has not been annotated with @IdleTimeoutExpiration. * @see IdleTimeoutExpiration * @see #getAnnotation(Object, Class) */ protected IdleTimeoutExpiration getIdleTimeout(Region.Entry<K, V> entry) { return getIdleTimeout(entry.getValue()); }
/** * Determines whether the Region Entry has been annotated with the TimeToLiveExpiration Annotation. * * @param entry the Region.Entry to evaluate for the presence of the TimeToLiveExpiration Annotation. * @return a boolean value indicating whether the Region Entry has been annotated with @TimeToLiveExpiration. * @see TimeToLiveExpiration * @see #isAnnotationPresent(Object, Class) */ protected boolean isTimeToLiveConfigured(Region.Entry<K, V> entry) { return entry != null && isTimeToLiveConfigured(entry.getValue()); }
/** * Gets the IdleTimeoutExpiration Annotation meta-data from the Region Entry. * * @param entry the Region.Entry from which to extract the IdleTimeoutExpiration Annotation meta-data. * @return the IdleTimeoutExpiration Annotation meta-data for the given Region Entry or {@code null} * if the Region Entry has not been annotated with @IdleTimeoutExpiration. * @see IdleTimeoutExpiration * @see #getAnnotation(Object, Class) */ protected IdleTimeoutExpiration getIdleTimeout(Region.Entry<K, V> entry) { return getIdleTimeout(entry.getValue()); }
/** * Gets the TimeToLiveExpiration Annotation meta-data from the Region Entry. * * @param entry the Region.Entry from which to extract the TimeToLiveExpiration Annotation meta-data. * @return the TimeToLiveExpiration Annotation meta-data for the given Region Entry or {@code null} * if the Region Entry has not been annotated with @TimeToLiveExpiration. * @see TimeToLiveExpiration * @see #getAnnotation(Object, Class) */ protected TimeToLiveExpiration getTimeToLive(Region.Entry<K, V> entry) { return getTimeToLive(entry.getValue()); }
/** * Gets the TimeToLiveExpiration Annotation meta-data from the Region Entry. * * @param entry the Region.Entry from which to extract the TimeToLiveExpiration Annotation meta-data. * @return the TimeToLiveExpiration Annotation meta-data for the given Region Entry or {@code null} * if the Region Entry has not been annotated with @TimeToLiveExpiration. * @see TimeToLiveExpiration * @see #getAnnotation(Object, Class) */ protected TimeToLiveExpiration getTimeToLive(Region.Entry<K, V> entry) { return getTimeToLive(entry.getValue()); }
value = e.getValue();
region.localDestroyRegion(); assertTrue(entry.isDestroyed()); assertTrue(region.isDestroyed());
region.destroyRegion(); assertTrue(entry.isDestroyed()); assertTrue(region.isDestroyed());
if (values[0] instanceof Region.Entry) { Region.Entry e = (Region.Entry) values[0]; if (!e.isDestroyed()) { try { values[0] = new CqEntry(e.getKey(), e.getValue()); } catch (EntryDestroyedException ignore) {
assertThat(rgn.getEntry("key").getValue()).isEqualTo("LV 1"); ((TXManagerImpl) txMgr).unpauseTransaction(tx); assertThat(rgn.getEntry("key").getValue()).isEqualTo("txValue"); assertThat(rgn.getEntry("key").getValue()).isEqualTo("txValue"); assertThat(rgn.getEntry("key3").getValue()).isEqualTo("txValue3"); assertThat(rgn.getEntry("key3").getValue()).isEqualTo("txValue3"); assertThat(v4).isEqualTo("LV 4"); assertThat(rgn.get("key4")).isEqualTo("LV 4"); assertThat(rgn.getEntry("key4").getValue()).isEqualTo("LV 4"); txMgr.rollback(); assertThat(rgn.getEntry("key4").getValue()).isEqualTo("LV 5"); assertThat(rgn.getEntry("key").getValue()).isEqualTo("txValue"); assertThat(rgn.getEntry("key").getValue()).isEqualTo("txValue"); ((TXManagerImpl) txMgr).unpauseTransaction(tx); assertThat(rgn.getEntry("key").getValue()).isEqualTo("new txValue"); assertThat(rgn.getEntry("key").getValue()).isEqualTo("new txValue"); Object localCmtValue = rgn.getEntry("key").getValue(); txMgr.begin();