Interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>>

Type Parameters:
K - the bean identifier type
V - the bean instance type
All Superinterfaces:
org.wildfly.clustering.ejb.remote.AffinitySupport<K>, AutoCloseable, org.wildfly.clustering.ejb.bean.BeanStatistics, org.wildfly.clustering.server.service.Service
All Known Implementing Classes:
DecoratedStatefulSessionBeanCache, DistributableStatefulSessionBeanCache, SimpleStatefulSessionBeanCache, SuspendableStatefulSessionBeanCache

public interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>> extends org.wildfly.clustering.server.service.Service, org.wildfly.clustering.ejb.bean.BeanStatistics, org.wildfly.clustering.ejb.remote.AffinitySupport<K>, AutoCloseable
A stateful session bean cache. Any StatefulSessionBean retrieved from this cache *must* invoke either StatefulSessionBean.close(), StatefulSessionBean.remove(), or StatefulSessionBean.discard() when complete.
Author:
Paul Ferraro
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ThreadLocal<Object>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Creates and caches a stateful bean using a generated identifier.
    Returns the stateful bean with the specified identifier, or null if no such bean exists.
    Returns the identifier factory of this cache.
    default boolean
    Checks whether the supplied Throwable is remotable - meaning it can be safely sent to the client over the wire.

    Methods inherited from interface org.wildfly.clustering.ejb.remote.AffinitySupport

    getStrongAffinity, getWeakAffinity

    Methods inherited from interface org.wildfly.clustering.ejb.bean.BeanStatistics

    getActiveCount, getPassiveCount

    Methods inherited from interface org.wildfly.clustering.server.service.Service

    isStarted, start, stop
  • Field Details

  • Method Details

    • createStatefulSessionBean

      StatefulSessionBean<K,V> createStatefulSessionBean()
      Creates and caches a stateful bean using a generated identifier.
      Returns:
      the newly created session bean
    • findStatefulSessionBean

      StatefulSessionBean<K,V> findStatefulSessionBean(K id)
      Returns the stateful bean with the specified identifier, or null if no such bean exists.
      Returns:
      an existing stateful bean, or null if none was found
    • isRemotable

      default boolean isRemotable(Throwable throwable)
      Checks whether the supplied Throwable is remotable - meaning it can be safely sent to the client over the wire.
    • getIdentifierFactory

      Supplier<K> getIdentifierFactory()
      Returns the identifier factory of this cache.
      Returns:
      an identifier factory
    • close

      void close()
      Specified by:
      close in interface AutoCloseable