Class DefaultBeanGroup<K,V extends BeanInstance<K>>
- java.lang.Object
-
- org.wildfly.clustering.ejb.cache.bean.DefaultImmutableBeanGroup<K,V>
-
- org.wildfly.clustering.ejb.cache.bean.DefaultBeanGroup<K,V>
-
- Type Parameters:
K- the bean identifier typeV- the bean instance type
- All Implemented Interfaces:
AutoCloseable,Mutator,BeanGroup<K,V>,ImmutableBeanGroup<K,V>,MutableBeanGroup<K,V>
public class DefaultBeanGroup<K,V extends BeanInstance<K>> extends DefaultImmutableBeanGroup<K,V> implements MutableBeanGroup<K,V>
A defaultBeanGroupimplementation based on a map of bean instances.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBeanInstance(V instance)Adds the specified bean instance to this group.voidmutate()VremoveBeanInstance(K id)Removes the bean instance with the specified identifier from this group.-
Methods inherited from class org.wildfly.clustering.ejb.cache.bean.DefaultImmutableBeanGroup
close, getBeanInstance, getId, isEmpty, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.wildfly.clustering.ejb.cache.bean.ImmutableBeanGroup
close, getBeanInstance, getId, isEmpty
-
-
-
-
Method Detail
-
addBeanInstance
public void addBeanInstance(V instance)
Description copied from interface:BeanGroupAdds the specified bean instance to this group.- Specified by:
addBeanInstancein interfaceBeanGroup<K,V extends BeanInstance<K>>- Parameters:
instance- a bean instance
-
removeBeanInstance
public V removeBeanInstance(K id)
Description copied from interface:BeanGroupRemoves the bean instance with the specified identifier from this group.- Specified by:
removeBeanInstancein interfaceBeanGroup<K,V extends BeanInstance<K>>- Parameters:
id- a bean instance identifier- Returns:
- the removed bean instance, or null, if no such bean instance existed
-
-