本文整理了Java中org.apache.geode.cache.Region.localDestroy
方法的一些代码示例,展示了Region.localDestroy
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Region.localDestroy
方法的具体详情如下:
包路径:org.apache.geode.cache.Region
类名称:Region
方法名:localDestroy
[英]Destroys the value with the specified key in the local cache only, No CacheWriter
is invoked. Destroy removes not only the value but also the key and entry from this region.
Does not update any CacheStatistics
.
[中]仅在本地缓存中使用指定的键销毁值,不调用CacheWriter
。Destroy不仅会删除该区域中的值,还会删除该区域中的键和条目。
不更新任何CacheStatistics
。
代码示例来源:origin: apache/geode
public void localDestroy(Object key, Object aCallbackArgument) throws EntryNotFoundException {
this.region.localDestroy(key, aCallbackArgument);
}
代码示例来源:origin: apache/geode
region.localDestroy(key);
} else {
region.destroy(key);
代码示例来源:origin: apache/geode
public void localDestroy(Object key) throws EntryNotFoundException {
this.region.localDestroy(key);
}
代码示例来源:origin: apache/geode
region.localDestroy(key);
fail("Should have thrown a RegionDestroyedException");
代码示例来源:origin: apache/geode
this.region.localDestroy(key, WAN_QUEUE_TOKEN);
this.stats.decQueueSize();
代码示例来源:origin: apache/geode
region.localDestroy(key);
fail("Should have thrown a RegionDestroyedException");
代码示例来源:origin: apache/geode
private void putIntoRegion(String regionName, int size, boolean isCachingProxy) {
Cache cache = getCache();
final Region region = cache.getRegion(regionName);
for (int i = 0; i < size; i++) {
region.put(i, i);
}
if (isCachingProxy) {
for (int i = 0; i < size; i++) {
region.localDestroy(i, i);
}
}
}
代码示例来源:origin: apache/geode
/**
* Test for bug 43407, where LRU in the client caused an entry to be evicted with DESTROY(), then
* the client invalidated the entry and did a get(). After the get() the entry was not seen to be
* in the client's cache. This turned out to be expected behavior, but we now have this test to
* guarantee that the product behaves as expected.
*/
@Test
public void testGetInClientCreatesEntry() throws Exception {
// start server first
PORT1 = initServerCache(false);
createClientCache(NetworkUtils.getServerHostName(), PORT1);
registerInterestForInvalidatesInBothTheRegions();
Region region = static_cache.getRegion(REGION_NAME1);
populateCache();
region.put("invalidationKey", "invalidationValue");
region.localDestroy("invalidationKey");
assertThat(region.containsKey("invalidationKey")).isFalse();
region.invalidate("invalidationKey");
assertThat(region.containsKey("invalidationKey")).isTrue();
Object value = region.get("invalidationKey");
assertThat(value).isNull();
assertThat(region.containsKeyOnServer("invalidationKey")).isTrue();
}
代码示例来源:origin: apache/geode
/**
* {@inheritDoc}
*/
@Override
public void destroySession(String id) {
if (!isStopping) {
try {
GemfireHttpSession session = (GemfireHttpSession) sessionCache.getOperatingRegion().get(id);
if (session != null && session.getJvmOwnerId().equals(jvmId)) {
LOG.debug("Destroying session {}", id);
sessionCache.getOperatingRegion().destroy(id);
mbean.decActiveSessions();
}
} catch (EntryNotFoundException nex) {
}
} else {
if (sessionCache.isClientServer()) {
LOG.debug("Destroying session {}", id);
try {
sessionCache.getOperatingRegion().localDestroy(id);
} catch (EntryNotFoundException nex) {
// Ignored
} catch (CacheClosedException ccex) {
// Ignored
}
}
}
}
代码示例来源:origin: apache/geode
@Override
public void process(ClusterDistributionManager dm) {
Region r = getRegion(dm.getSystem());
if (r != null) {
try {
if (action == ExpirationAction.LOCAL_DESTROY) {
r.localDestroy(key);
} else if (action == ExpirationAction.DESTROY) {
r.destroy(key);
} else if (action == ExpirationAction.INVALIDATE) {
r.invalidate(key);
} else if (action == ExpirationAction.LOCAL_INVALIDATE) {
r.localInvalidate(key);
}
} catch (Exception e) {
logger.warn("Failed attempt to destroy or invalidate entry {} {} from console at {}",
new Object[] {r.getFullPath(), key, this.getSender()});
}
}
}
代码示例来源:origin: apache/geode
rgn.localDestroy("key");
} else {
rgn.destroy("key");
rgn.localDestroy("key");
} else {
rgn.destroy("key");
assertThat(ev.getOperation().isDistributed()).isTrue();
rgn.localDestroy("key");
代码示例来源:origin: apache/geode
getLogger().debug("Locally destroying session " + session.getId());
getSessionCache().getOperatingRegion().localDestroy(session.getId());
代码示例来源:origin: apache/geode
pr.localDestroy(key42169);
boolean success = pr.replace(key42169, "initialValue42169", "newValue42169");
assertTrue("expected replace to succeed", success);
pr.destroy(key42169);
pr.put(key42169, "secondRound");
pr.localDestroy(key42169);
Object result = pr.putIfAbsent(key42169, null);
assertEquals("expected putIfAbsent to fail", result, "secondRound");
代码示例来源:origin: apache/geode
region.localDestroy(key);
if (isMirrored)
fail("Should have thrown an IllegalStateException");
assertNotNull(entry);
region.localDestroy(key);
代码示例来源:origin: org.apache.geode/geode-modules
getLogger().debug("Locally destroying session " + session.getId());
getSessionCache().getOperatingRegion().localDestroy(session.getId());
内容来源于网络,如有侵权,请联系作者删除!