Class InfinispanBeanFactory<I,T,C>
- java.lang.Object
-
- org.wildfly.clustering.ejb.infinispan.bean.InfinispanBeanFactory<I,T,C>
-
- Type Parameters:
I- the bean identifier typeT- the bean typeC- the marshalling context type
- All Implemented Interfaces:
org.wildfly.clustering.ee.Creator<I,BeanEntry<I>,I>,org.wildfly.clustering.ee.Locator<I,BeanEntry<I>>,BeanFactory<I,T>,BeanRemover<I,T>
public class InfinispanBeanFactory<I,T,C> extends Object implements BeanFactory<I,T>
Encapsulates the cache mapping strategy for a bean.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description InfinispanBeanFactory(String beanName, BeanGroupFactory<I,T,C> groupFactory, org.infinispan.Cache<BeanKey<I>,BeanEntry<I>> cache, org.wildfly.clustering.ee.cache.CacheProperties properties, Duration timeout, PassivationListener<T> listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bean<I,T>createBean(I id, BeanEntry<I> entry)BeanKey<I>createKey(I id)BeanEntry<I>createValue(I id, I groupId)BeanEntry<I>findValue(I id)booleanremove(I id, RemoveListener<T> listener)Removes the specified bean, triggering the specified listenerBeanEntry<I>tryValue(I id)
-
-
-
Method Detail
-
createBean
public Bean<I,T> createBean(I id, BeanEntry<I> entry)
- Specified by:
createBeanin interfaceBeanFactory<I,T>
-
remove
public boolean remove(I id, RemoveListener<T> listener)
Description copied from interface:BeanRemoverRemoves the specified bean, triggering the specified listener- Specified by:
removein interfaceBeanRemover<I,T>- Parameters:
id- a bean identifierlistener- a removal listener- Returns:
- true, if the bean was (or was already) removed, false otherwise
-
-