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 default
BeanGroup implementation based on a map of bean instances.- Author:
- Paul Ferraro
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBeanInstance(V instance) Adds the specified bean instance to this group.voidmutate()removeBeanInstance(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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wildfly.clustering.ejb.cache.bean.ImmutableBeanGroup
close, getBeanInstance, getId, isEmpty
-
Constructor Details
-
DefaultBeanGroup
-
-
Method Details
-
addBeanInstance
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
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
-
mutate
public void mutate()
-