}
}
logger.trace("Aggregating event {} - {}", eventCounter, item);
//Load or create the event session
EventSession eventSession = getEventSession(item);
//Give each interval aware aggregator a chance at the event
for (final IntervalAwarePortalEventAggregator<PortalEvent> portalEventAggregator : intervalAwarePortalEventAggregators) {
if (checkSupports(portalEventAggregator, item)) {
final Class<? extends IPortalEventAggregator<?>> aggregatorType = PortalRawEventsAggregatorImpl.this.getClass(portalEventAggregator);
//Get aggregator specific interval info map
final Map<AggregationInterval, AggregationIntervalInfo> aggregatorIntervalInfo = this.getAggregatorIntervalInfo(aggregatorType);
//If there is an event session get the aggregator specific version of it
if (eventSession != null) {
final AggregatedGroupConfig aggregatorGroupConfig = getAggregatorGroupConfig(aggregatorType);
final CacheKey key = CacheKey.build(EVENT_SESSION_CACHE_KEY_SOURCE, eventSession, aggregatorGroupConfig);
EventSession filteredEventSession = this.eventAggregationContext.getAttribute(key);
if (filteredEventSession == null) {
filteredEventSession = new FilteredEventSession(eventSession, aggregatorGroupConfig);
this.eventAggregationContext.setAttribute(key, filteredEventSession);
}
eventSession = filteredEventSession;