Search in sources :

Example 6 with CacheEntryMutator

use of org.wildfly.clustering.ee.infinispan.CacheEntryMutator in project wildfly by wildfly.

the class InfinispanBeanFactory method createBean.

@Override
public Bean<I, T> createBean(I id, BeanEntry<I> entry) {
    I groupId = entry.getGroupId();
    BeanGroupEntry<I, T> groupEntry = this.groupFactory.findValue(groupId);
    if (groupEntry == null) {
        InfinispanEjbLogger.ROOT_LOGGER.invalidBeanGroup(id, groupId);
        this.cache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES).remove(this.createKey(id));
        return null;
    }
    BeanGroup<I, T> group = this.groupFactory.createGroup(groupId, groupEntry);
    Mutator mutator = (entry.getLastAccessedTime() == null) ? Mutator.PASSIVE : new CacheEntryMutator<>(this.cache, this.createKey(id), entry);
    return new InfinispanBean<>(id, entry, group, mutator, this, this.timeout, this.listener);
}
Also used : CacheEntryMutator(org.wildfly.clustering.ee.infinispan.CacheEntryMutator) Mutator(org.wildfly.clustering.ee.Mutator)

Aggregations

Mutator (org.wildfly.clustering.ee.Mutator)6 CacheEntryMutator (org.wildfly.clustering.ee.infinispan.CacheEntryMutator)6 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1