Package org.wildfly.clustering.ejb.bean
Interface Bean<K,V extends BeanInstance<K>>
-
- Type Parameters:
K- the bean identifier typeV- the bean instance type
- All Superinterfaces:
AutoCloseable,ImmutableBean<K,V>
public interface Bean<K,V extends BeanInstance<K>> extends ImmutableBean<K,V>, AutoCloseable
Described the mutable and immutable properties of a cached bean.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes any resources used by this bean.BeanMetaData<K>getMetaData()Returns the metadata of this bean.booleanisValid()Indicates whether or not this bean is valid, i.e.voidremove(Consumer<V> removeTask)Removes this bean from the cache, executing the specified task.-
Methods inherited from interface org.wildfly.clustering.ejb.bean.ImmutableBean
getId, getInstance
-
-
-
-
Method Detail
-
getMetaData
BeanMetaData<K> getMetaData()
Returns the metadata of this bean.- Specified by:
getMetaDatain interfaceImmutableBean<K,V extends BeanInstance<K>>- Returns:
-
isValid
boolean isValid()
Indicates whether or not this bean is valid, i.e. not closed nor removed.- Returns:
- true, if this bean is valid, false otherwise
-
remove
void remove(Consumer<V> removeTask)
Removes this bean from the cache, executing the specified task.
-
close
void close()
Closes any resources used by this bean.- Specified by:
closein interfaceAutoCloseable
-
-