本文整理了Java中com.hazelcast.core.IMap.flush()
方法的一些代码示例,展示了IMap.flush()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IMap.flush()
方法的具体详情如下:
包路径:com.hazelcast.core.IMap
类名称:IMap
方法名:flush
[英]If this map has a MapStore, this method flushes all the local dirty entries.
Interactions with the map store
Calls MapStore#storeAll(Map) and/or MapStore#deleteAll(Collection) with elements marked dirty. Please note that this method has effect only if write-behind persistence mode is configured. If the persistence mode is write-through calling this method has no practical effect, but an operation is executed on all partitions wasting resources.
[中]如果此映射具有MapStore,则此方法将刷新所有本地脏项。
与地图商店的交互
调用MapStore#storeAll(Map)和/或MapStore#deleteAll(Collection),并使用标记为脏的元素。请注意,此方法仅在配置了write-behind持久化模式时有效。如果持久化模式是write-through,则调用此方法没有实际效果,但会在所有分区上执行操作,从而浪费资源。
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public void flush() {
map.flush();
}
代码示例来源:origin: io.snamp/internal-services
@Override
public void refresh() {
if (detached)
throw detachedException();
distributedMap.flush();
}
代码示例来源:origin: dsukhoroslov/bagri
@Override
public void stateChanged(LifecycleEvent event) {
logger.info("stateChanged; event: {}", event);
if (LifecycleState.STARTED == event.getState()) {
xtxCache = nodeEngine.getHazelcastInstance().getMap(CN_XDM_TRANSACTION);
xddCache = nodeEngine.getHazelcastInstance().getMap(CN_XDM_DOCUMENT);
keyCache = nodeEngine.getHazelcastInstance().getMap(CN_XDM_KEY);
//readCatalog(catalog);
// too early
//checkPopulation(nodeEngine.getClusterService().getSize());
} else if (LifecycleState.SHUTTING_DOWN == event.getState()) {
xtxCache.flush();
xddCache.flush();
logger.info("stateChanged; Maps were flushed");
}
}
内容来源于网络,如有侵权,请联系作者删除!