Interface Bean<K,V extends BeanInstance<K>>

Type Parameters:
K - the bean identifier type
V - 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

    Modifier and Type
    Method
    Description
    void
    Closes any resources used by this bean.
    Returns the metadata of this bean.
    boolean
    Indicates whether or not this bean is valid, i.e.
    void
    remove(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 Details

    • getMetaData

      BeanMetaData<K> getMetaData()
      Returns the metadata of this bean.
      Specified by:
      getMetaData in interface ImmutableBean<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:
      close in interface AutoCloseable