Class InfinispanBeanGroupFactory<I,T,C>
- java.lang.Object
-
- org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupFactory<I,T,C>
-
- Type Parameters:
I- the bean identifier typeT- the bean typeC- the marshalling context
- All Implemented Interfaces:
org.wildfly.clustering.ee.Creator<I,BeanGroupEntry<I,T,C>,Void>,org.wildfly.clustering.ee.Locator<I,BeanGroupEntry<I,T,C>>,org.wildfly.clustering.ee.Remover<I>,BeanGroupEvictor<I>,BeanGroupFactory<I,T,C>
public class InfinispanBeanGroupFactory<I,T,C> extends Object implements BeanGroupFactory<I,T,C>
Encapsulates the cache mapping strategy of a bean group.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description InfinispanBeanGroupFactory(org.infinispan.Cache<BeanGroupKey<I>,BeanGroupEntry<I,T,C>> cache, org.infinispan.Cache<BeanKey<I>,BeanEntry<I>> beanCache, Predicate<Map.Entry<? super BeanKey<I>,? super BeanEntry<I>>> beanFilter, org.wildfly.clustering.marshalling.spi.MarshalledValueFactory<C> factory, org.wildfly.clustering.ee.cache.CacheProperties properties, PassivationConfiguration<T> passivation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<BeanGroupKey<I>,BeanGroupEntry<I,T,C>> event)voidclose()BeanGroup<I,T>createGroup(I id, BeanGroupEntry<I,T,C> entry)Create a new bean group using the specified identifier and entry.BeanGroupKey<I>createKey(I id)BeanGroupEntry<I,T,C>createValue(I id, Void context)voidevict(I id)Evicts the bean group identified by the specified identifier.BeanGroupEntry<I,T,C>findValue(I id)intgetPassiveCount()CompletionStage<Void>passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<BeanGroupKey<I>,BeanGroupEntry<I,T,C>> event)booleanremove(I id)BeanGroupEntry<I,T,C>tryValue(I id)
-
-
-
Constructor Detail
-
InfinispanBeanGroupFactory
public InfinispanBeanGroupFactory(org.infinispan.Cache<BeanGroupKey<I>,BeanGroupEntry<I,T,C>> cache, org.infinispan.Cache<BeanKey<I>,BeanEntry<I>> beanCache, Predicate<Map.Entry<? super BeanKey<I>,? super BeanEntry<I>>> beanFilter, org.wildfly.clustering.marshalling.spi.MarshalledValueFactory<C> factory, org.wildfly.clustering.ee.cache.CacheProperties properties, PassivationConfiguration<T> passivation)
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceBeanGroupFactory<I,T,C>
-
getPassiveCount
public int getPassiveCount()
- Specified by:
getPassiveCountin interfaceBeanGroupFactory<I,T,C>
-
createKey
public BeanGroupKey<I> createKey(I id)
- Specified by:
createKeyin interfaceBeanGroupFactory<I,T,C>
-
findValue
public BeanGroupEntry<I,T,C> findValue(I id)
-
tryValue
public BeanGroupEntry<I,T,C> tryValue(I id)
-
remove
public boolean remove(I id)
- Specified by:
removein interfaceorg.wildfly.clustering.ee.Remover<I>
-
createGroup
public BeanGroup<I,T> createGroup(I id, BeanGroupEntry<I,T,C> entry)
Description copied from interface:BeanGroupFactoryCreate a new bean group using the specified identifier and entry.- Specified by:
createGroupin interfaceBeanGroupFactory<I,T,C>- Parameters:
id- a group identifierentry- the cache entry for the group- Returns:
- a bean group
-
evict
public void evict(I id)
Description copied from interface:BeanGroupEvictorEvicts the bean group identified by the specified identifier.- Specified by:
evictin interfaceBeanGroupEvictor<I>- Parameters:
id- a bean group identifier.
-
passivated
public CompletionStage<Void> passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<BeanGroupKey<I>,BeanGroupEntry<I,T,C>> event)
-
activated
public CompletionStage<Void> activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<BeanGroupKey<I>,BeanGroupEntry<I,T,C>> event)
-
-