Search in sources :

Example 1 with CacheEntryPassivated

use of org.infinispan.notifications.cachelistener.annotation.CacheEntryPassivated in project wildfly by wildfly.

the class InfinispanSessionManager method passivated.

@CacheEntryPassivated
public void passivated(CacheEntryPassivatedEvent<SessionCreationMetaDataKey, ?> event) {
    if (event.isPre() && !this.properties.isPersistent()) {
        String id = event.getKey().getValue();
        InfinispanWebLogger.ROOT_LOGGER.tracef("Session %s will be passivated", id);
        Map.Entry<MV, AV> value = this.factory.findValue(id);
        if (value != null) {
            ImmutableSession session = this.factory.createImmutableSession(id, value);
            this.triggerPrePassivationEvents(session);
        }
    }
}
Also used : ImmutableSession(org.wildfly.clustering.web.session.ImmutableSession) Map(java.util.Map) CacheEntryPassivated(org.infinispan.notifications.cachelistener.annotation.CacheEntryPassivated)

Aggregations

Map (java.util.Map)1 CacheEntryPassivated (org.infinispan.notifications.cachelistener.annotation.CacheEntryPassivated)1 ImmutableSession (org.wildfly.clustering.web.session.ImmutableSession)1