本文整理汇总了Java中org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent.isPre方法的典型用法代码示例。如果您正苦于以下问题:Java CacheEntryCreatedEvent.isPre方法的具体用法?Java CacheEntryCreatedEvent.isPre怎么用?Java CacheEntryCreatedEvent.isPre使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent
的用法示例。
在下文中一共展示了CacheEntryCreatedEvent.isPre方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onNewNotifyTrigger
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void onNewNotifyTrigger(CacheEntryCreatedEvent cacheEvent) {
if (cacheEvent.isPre()) {
if (log.isDebugEnabled()) {
log.debug("Discarding pre onNewNotifyTrigger(@CacheEntryCreated) event");
}
return;
}
NotifyTrigger notifyTrigger = (NotifyTrigger)triggersCache.get(cacheEvent.getKey());
if (log.isDebugEnabled()) {
log.debugf("onNewNotifyTrigger(@CacheEntryCreated) received on %s", currentNode);
log.debugf("CacheEvent: %s", cacheEvent);
log.debugf("NotifyTrigger: %s", notifyTrigger);
}
processNotifyTrigger(notifyTrigger);
}
示例2: created
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void created(CacheEntryCreatedEvent<String, Property<?>> event) {
if (event.isPre()) {
return;
}
List<Observer> observers = this.observersMap.get(event.getKey());
if (observers != null) {
observers.forEach(observer -> observer.created(event.getValue()));
}
}
示例3: onPartitionModified
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void onPartitionModified(CacheEntryCreatedEvent cacheEvent) {
if (cacheEvent.isPre()) {
if (log.isDebugEnabled()) {
log.debug("Discarding pre onPartitionModified(@CacheEntryModified) event");
}
return;
}
/*
Listener should be invoked once Partition has been modified by a topology change
*/
if (cacheEvent.getKey().equals(PARTITION_CHANGE)) {
invokePartitionChangeListener();
}
}
示例4: onNewNotifyData
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void onNewNotifyData(CacheEntryCreatedEvent cacheEvent) {
if (cacheEvent.isPre()) {
log.debug("Discarding pre onNewNotifyData(@CacheEntryCreated) event");
return;
}
NotifyData notifyData = (NotifyData)dataCache.get(cacheEvent.getKey());
if (log.isDebugEnabled()) {
log.debug("onNewNotifyData(@CacheEntryCreated) received.");
log.debugf("NotifyData: %s", notifyData);
}
processNotifyData(notifyData);
}
示例5: dataAdded
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void dataAdded(CacheEntryCreatedEvent event) {
if (log.isTraceEnabled()) {
if (event.isPre()) {
log.trace("Going to add new entry " + event.getKey() + " to the cache " + event.getCache().getName());
} else {
log.trace("Added new entry " + event.getKey() + " to the cache " + event.getCache().getName());
}
}
}
示例6: observeCreate
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void observeCreate(CacheEntryCreatedEvent<Object, Object> event) {
if (event.isPre()) {
return;
}
if (this.toBeUpdated != null) {
this.toBeUpdated.entryCreated(event.getKey(), this.containerName,
this.cacheName, event.isOriginLocal());
}
}
示例7: created
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void created(CacheEntryCreatedEvent<Long, XOffering> event) {
if (!event.isPre())
addCourses(event.getValue());
}
示例8: entryCreated
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void entryCreated(CacheEntryCreatedEvent<String, String> event) {
if (!event.isPre())
System.out.println("Created new entry: " + event.getKey() + " " + event.getValue());
}
示例9: entryCreated
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent; //导入方法依赖的package包/类
@CacheEntryCreated
public void entryCreated(CacheEntryCreatedEvent<String, String> event) {
// We are only interested in the post event
if (!event.isPre())
System.out.printf("Created %s\n", event.getKey());
}