Interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>>
-
- Type Parameters:
K- the bean identifier typeV- the bean instance type
- All Superinterfaces:
AffinitySupport<K>,BeanStatistics,Restartable
- All Known Implementing Classes:
DistributableStatefulSessionBeanCache,SimpleStatefulSessionBeanCache
public interface StatefulSessionBeanCache<K,V extends StatefulSessionBeanInstance<K>> extends Restartable, BeanStatistics, AffinitySupport<K>
A stateful session bean cache. AnyStatefulSessionBeanretrieved from this cache *must* invoke eitherStatefulSessionBean.close(),StatefulSessionBean.remove(), orStatefulSessionBean.discard()when complete.- Author:
- Paul Ferraro
-
-
Field Summary
Fields Modifier and Type Field Description static ThreadLocal<Object>CURRENT_GROUP
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description KcreateStatefulSessionBean()Creates and caches a stateful bean using a generated identifier.StatefulSessionBean<K,V>findStatefulSessionBean(K id)Returns the stateful bean with the specified identifier, or null if no such bean exists.Supplier<K>getIdentifierFactory()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, getWeakAffinity
-
Methods inherited from interface org.wildfly.clustering.ejb.bean.BeanStatistics
getActiveCount, getPassiveCount
-
Methods inherited from interface org.wildfly.clustering.ee.Restartable
start, stop
-
-
-
-
Field Detail
-
CURRENT_GROUP
static final ThreadLocal<Object> CURRENT_GROUP
-
-
Method Detail
-
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 suppliedThrowableis remotable - meaning it can be safely sent to the client over the wire.
-
-