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

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

public interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>> extends org.wildfly.clustering.server.manager.Service, BeanStatistics, AffinitySupport<K>
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 Details

  • Method Details

    • createStatefulSessionBean

      K createStatefulSessionBean()
      Creates and caches a stateful bean using a generated identifier.
      Returns:
      the identifier of the 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