Class DefaultImmutableBeanGroup<K,V extends BeanInstance<K>>
- java.lang.Object
-
- org.wildfly.clustering.ejb.cache.bean.DefaultImmutableBeanGroup<K,V>
-
- Type Parameters:
K- the bean identifier typeV- the bean instance type
- All Implemented Interfaces:
AutoCloseable,ImmutableBeanGroup<K,V>
- Direct Known Subclasses:
DefaultBeanGroup
public class DefaultImmutableBeanGroup<K,V extends BeanInstance<K>> extends Object implements ImmutableBeanGroup<K,V>
A defaultImmutableBeanGroupimplementation based on a map of bean instances.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Indicates that the caller is finished with the bean group, and that it should close any resources.VgetBeanInstance(K id)Returns the bean instance with the specified identifier.KgetId()Returns the unique identifier of this bean group.booleanisEmpty()Indicates whether or not this bean group contains and bean instances.StringtoString()
-
-
-
Method Detail
-
getId
public K getId()
Description copied from interface:ImmutableBeanGroupReturns the unique identifier of this bean group.- Specified by:
getIdin interfaceImmutableBeanGroup<K,V extends BeanInstance<K>>- Returns:
- a unique identifier
-
isEmpty
public boolean isEmpty()
Description copied from interface:ImmutableBeanGroupIndicates whether or not this bean group contains and bean instances.- Specified by:
isEmptyin interfaceImmutableBeanGroup<K,V extends BeanInstance<K>>- Returns:
- true, if this bean group is empty, false otherwise
-
getBeanInstance
public V getBeanInstance(K id)
Description copied from interface:ImmutableBeanGroupReturns the bean instance with the specified identifier.- Specified by:
getBeanInstancein interfaceImmutableBeanGroup<K,V extends BeanInstance<K>>- Parameters:
id- a bean instance identifier- Returns:
- the requested bean instance, or null, if no such bean instance exists.
-
close
public void close()
Description copied from interface:ImmutableBeanGroupIndicates that the caller is finished with the bean group, and that it should close any resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceImmutableBeanGroup<K,V extends BeanInstance<K>>
-
-