当前位置: 首页>>代码示例>>Java>>正文


Java EntryEvent.getKey方法代码示例

本文整理汇总了Java中com.hazelcast.core.EntryEvent.getKey方法的典型用法代码示例。如果您正苦于以下问题:Java EntryEvent.getKey方法的具体用法?Java EntryEvent.getKey怎么用?Java EntryEvent.getKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hazelcast.core.EntryEvent的用法示例。


在下文中一共展示了EntryEvent.getKey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEntryChange

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
private void onEntryChange(RefreshableConfiguration refreshableConfiguration,
                           EntryEvent<String, String> entry,
                           IMap<String, String> configMap) {

    String entryKey = entry.getKey();
    String configContent = configMap.get(entryKey);

    if (refreshableConfiguration.isListeningConfiguration(entryKey)) {

        refreshableConfiguration.onRefresh(entryKey, configContent);

        log.info(
            "Process config update event: "
            + "[key = {}, evtType = {}, size = {}, newHash = {}, oldHash = {}] in bean: [{}]",
            entryKey,
            entry.getEventType(),
            StringUtils.length(configContent),
            getValueHash(configContent),
            getValueHash(entry.getOldValue()),
            getBeanName(refreshableConfiguration));

    } else {
        log.debug("Ignored config update event: [key = {}, evtType = {}, configSize = {} in bean [{}]",
                  entryKey,
                  entry.getEventType(),
                  StringUtils.length(configContent),
                  getBeanName(refreshableConfiguration));
    }
}
 
开发者ID:xm-online,项目名称:xm-commons,代码行数:30,代码来源:InitRefreshableConfigurationBeanPostProcessor.java

示例2: entryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryAdded(EntryEvent<String, E> event) {
	logger.trace("entryAdded; event: {}", event);
	String entityName = event.getKey();
	try {
		initEntityManager(entityName);
	} catch (MBeanExportException | MalformedObjectNameException ex) {
		// JMX registration failed.
		logger.error("entryAdded.error: ", ex);
	}
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:12,代码来源:EntityManagement.java

示例3: entryRemoved

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryRemoved(EntryEvent<String, E> event) {
	logger.trace("entryRemoved; event: {}", event);
	String entityName = event.getKey();
	EntityManager<E> eMgr = mgrCache.remove(entityName);
	try {
		mbeanExporter.unregisterManagedResource(eMgr.getObjectName());
	} catch (MalformedObjectNameException ex) {
		logger.error("entryRemoved.error: ", ex);
	}
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:12,代码来源:EntityManagement.java

示例4: entryUpdated

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryUpdated(EntryEvent<K, V> entry) {
  K k = entry.getKey();
  ChoosableSet<V> entries = cache.get(k);
  if (entries != null) {
    entries.add(entry.getValue());
  }
}
 
开发者ID:vert-x3,项目名称:vertx-hazelcast,代码行数:9,代码来源:HazelcastAsyncMultiMap.java

示例5: entryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryAdded(EntryEvent<SeqNum, LogValue> event) {
    // Cache maintenance
    cache.put(event.getKey(),
              ConcurrentUtils.constantFuture(event.getValue()));

    // TODO will need suppress mechanism once we have health check

    if (lastLog.compareTo(event.getKey()) < 0) {
        lastLog = event.getKey();
    }
    for (LogEventListener lsnr : listeners) {
        lsnr.logAdded(event.getKey());
    }
}
 
开发者ID:opennetworkinglab,项目名称:spring-open,代码行数:16,代码来源:LogMapManager.java

示例6: chunkKey

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
private String chunkKey(EntryEvent<Serializable, AsciiFileChunk> event)
{
  return event.getKey() + "-" + event.getValue().getRecordIndex();
}
 
开发者ID:javanotes,项目名称:reactive-data,代码行数:5,代码来源:AsciiFileDistributor.java


注:本文中的com.hazelcast.core.EntryEvent.getKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。