本文整理汇总了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));
}
}
示例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);
}
}
示例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);
}
}
示例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());
}
}
示例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());
}
}
示例6: chunkKey
import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
private String chunkKey(EntryEvent<Serializable, AsciiFileChunk> event)
{
return event.getKey() + "-" + event.getValue().getRecordIndex();
}