Search in sources :

Example 1 with CacheEntryCreated

use of org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated in project indy by Commonjava.

the class ScheduleManager method scheduled.

@CacheEntryCreated
public void scheduled(final CacheEntryCreatedEvent<ScheduleKey, Map> e) {
    final ScheduleKey expiredKey = e.getKey();
    final Map expiredContent = e.getValue();
    if (expiredKey != null && expiredContent != null) {
        logger.debug("Expiration Created: {}", expiredKey);
        final String type = (String) expiredContent.get(ScheduleManager.JOB_TYPE);
        final String data = (String) expiredContent.get(ScheduleManager.PAYLOAD);
        eventDispatcher.fire(new SchedulerScheduleEvent(type, data));
    }
}
Also used : Map(java.util.Map) HashMap(java.util.HashMap) CacheEntryCreated(org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 CacheEntryCreated (org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated)1