Interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>>
- Type Parameters:
K- the bean identifier typeV- the bean instance type
- All Superinterfaces:
AffinitySupport<K>,AutoCloseable,BeanStatistics,Service
- All Known Implementing Classes:
DecoratedStatefulSessionBeanCache,DistributableStatefulSessionBeanCache,SimpleStatefulSessionBeanCache,SuspendableStatefulSessionBeanCache
public interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>>
extends Service, BeanStatistics, 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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 booleanisRemotable(Throwable throwable) Checks whether the suppliedThrowableis remotable - meaning it can be safely sent to the client over the wire.Methods inherited from interface org.wildfly.clustering.ejb.remote.AffinitySupport
getStrongAffinity, getWeakAffinityMethods inherited from interface org.wildfly.clustering.ejb.bean.BeanStatistics
getActiveCount, getPassiveCount
-
Field Details
-
CURRENT_GROUP
-
-
Method Details
-
createStatefulSessionBean
StatefulSessionBean<K,V> createStatefulSessionBean()Creates and caches a stateful bean using a generated identifier.- Returns:
- the newly created session bean
-
findStatefulSessionBean
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
Checks whether the suppliedThrowableis remotable - meaning it can be safely sent to the client over the wire. -
getIdentifierFactory
Returns the identifier factory of this cache.- Returns:
- an identifier factory
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-