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 default
ImmutableBeanGroup implementation based on a map of bean instances.- Author:
- Paul Ferraro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Indicates that the caller is finished with the bean group, and that it should close any resources.getBeanInstance(K id) Returns the bean instance with the specified identifier.getId()Returns the unique identifier of this bean group.booleanisEmpty()Indicates whether or not this bean group contains and bean instances.toString()
-
Constructor Details
-
DefaultImmutableBeanGroup
-
-
Method Details
-
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
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>>
-
toString
-