|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService<T>
public abstract class AbstractJBossCacheService<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
Abstract base implementation of DistributedCacheManager
.
Field Summary | |
---|---|
static Integer |
ATTRIBUTE_KEY
|
protected org.jboss.web.tomcat.service.session.distributedcache.spi.BatchingManager |
batchingManager
|
static String |
BUDDY_BACKUP
|
static org.jboss.cache.Fqn<String> |
BUDDY_BACKUP_FQN
|
protected String |
cacheConfigName_
|
protected JBossCacheWrapper |
cacheWrapper_
|
protected String |
combinedPath_
Context path for webapp + hostName; this + session id is a unique combo. |
static String |
FQN_DELIMITER
|
protected static Set<Integer> |
INTERNAL_KEYS
|
protected org.jboss.logging.Logger |
log_
|
static Integer |
METADATA_KEY
|
static String |
SESSION
|
static Integer |
TIMESTAMP_KEY
|
static Integer |
VERSION_KEY
|
Constructor Summary | |
---|---|
protected |
AbstractJBossCacheService(org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager localManager)
|
protected |
AbstractJBossCacheService(org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager localManager,
org.jboss.cache.Cache<Object,Object> cache)
|
Method Summary | |
---|---|
void |
evictSession(String realId)
|
void |
evictSession(String realId,
String dataOwner)
|
org.jboss.web.tomcat.service.session.distributedcache.spi.BatchingManager |
getBatchingManager()
Get specfically the BatchModeTransactionManager. |
static org.jboss.cache.Fqn<String> |
getBuddyBackupSessionFqn(String dataOwner,
String contextHostPath,
String sessionId)
|
protected org.jboss.cache.Cache<Object,Object> |
getCache()
|
protected Set<String> |
getChildrenNames(org.jboss.cache.Fqn<String> fqn)
|
static String |
getCombinedPath(String hostname,
String contextPath)
|
protected org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData |
getDistributableSessionData(String realId,
Map<Object,Object> distributedCacheData,
boolean includeAttributes)
Extracts the contents of distributedCacheData . |
protected org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager |
getManager()
|
protected Object |
getMarshalledValue(Object value)
|
protected abstract Map<String,Object> |
getSessionAttributes(String realId,
Map<Object,Object> distributedCacheData)
Returns the session attributes, possibly using the passed in distributedCacheData as a source. |
org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData |
getSessionData(String realId,
boolean initialLoad)
|
org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData |
getSessionData(String realId,
String dataOwner,
boolean includeAttributes)
|
static org.jboss.cache.Fqn<String> |
getSessionFqn(String contextHostPath,
String sessionId)
|
Map<String,String> |
getSessionIds()
Gets the ids of all sessions in the underlying cache. |
protected Object |
getUnMarshalledValue(Object obj)
|
protected org.jboss.cache.Fqn<String> |
getWebappFqn()
|
boolean |
isMarshallingAvailable()
Gets whether TreeCache-based marshalling is available |
boolean |
isPassivationEnabled()
|
protected void |
releaseCacheToManager(String cacheConfigName)
|
void |
removeSession(String realId)
|
void |
removeSessionLocal(String realId)
|
void |
removeSessionLocal(String realId,
String dataOwner)
|
protected void |
removeSessionRegion(String realId,
org.jboss.cache.Fqn<String> fqn)
Extension point to allow subclasses to remove per-session JBC regions. |
void |
sessionCreated(String realId)
|
protected void |
setCache(org.jboss.cache.Cache<Object,Object> cache)
|
protected void |
setupSessionRegion(org.jboss.cache.Fqn<String> fqn)
Extension point to allow subclasses to add per-session JBC regions. |
void |
start()
|
void |
stop()
|
protected abstract void |
storeSessionAttributes(Map<Object,Object> dataMap,
T sessionData)
|
void |
storeSessionData(T sessionData)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager |
---|
getAttribute, getAttributeKeys, getAttributes, getSupportsAttributeOperations, putAttribute, putAttribute, removeAttribute, removeAttributeLocal |
Field Detail |
---|
public static final String BUDDY_BACKUP
public static final org.jboss.cache.Fqn<String> BUDDY_BACKUP_FQN
public static final String SESSION
public static final Integer VERSION_KEY
public static final Integer TIMESTAMP_KEY
public static final Integer METADATA_KEY
public static final Integer ATTRIBUTE_KEY
protected static final Set<Integer> INTERNAL_KEYS
public static final String FQN_DELIMITER
protected org.jboss.logging.Logger log_
protected String combinedPath_
protected org.jboss.web.tomcat.service.session.distributedcache.spi.BatchingManager batchingManager
protected JBossCacheWrapper cacheWrapper_
protected String cacheConfigName_
Constructor Detail |
---|
protected AbstractJBossCacheService(org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager localManager) throws org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException
org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException
protected AbstractJBossCacheService(org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager localManager, org.jboss.cache.Cache<Object,Object> cache)
Method Detail |
---|
public static String getCombinedPath(String hostname, String contextPath)
public static org.jboss.cache.Fqn<String> getSessionFqn(String contextHostPath, String sessionId)
public static org.jboss.cache.Fqn<String> getBuddyBackupSessionFqn(String dataOwner, String contextHostPath, String sessionId)
protected org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager getManager()
protected org.jboss.cache.Cache<Object,Object> getCache()
protected void setCache(org.jboss.cache.Cache<Object,Object> cache)
public void start()
start
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public void stop()
stop
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public org.jboss.web.tomcat.service.session.distributedcache.spi.BatchingManager getBatchingManager()
getBatchingManager
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public boolean isMarshallingAvailable()
public void sessionCreated(String realId)
sessionCreated
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData getSessionData(String realId, boolean initialLoad)
getSessionData
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public void storeSessionData(T sessionData)
storeSessionData
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
protected void setupSessionRegion(org.jboss.cache.Fqn<String> fqn)
session
- the sessionfqn
- the fqn for the sessionprotected abstract void storeSessionAttributes(Map<Object,Object> dataMap, T sessionData)
protected void removeSessionRegion(String realId, org.jboss.cache.Fqn<String> fqn)
session
- the sessionfqn
- the fqn for the sessionpublic void removeSession(String realId)
removeSession
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public void removeSessionLocal(String realId)
removeSessionLocal
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public void removeSessionLocal(String realId, String dataOwner)
removeSessionLocal
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public void evictSession(String realId)
evictSession
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public void evictSession(String realId, String dataOwner)
evictSession
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData getSessionData(String realId, String dataOwner, boolean includeAttributes)
getSessionData
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
public Map<String,String> getSessionIds()
getSessionIds
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
null
value if buddy
replication is not enabled.) Will not return null
.protected Set<String> getChildrenNames(org.jboss.cache.Fqn<String> fqn)
public boolean isPassivationEnabled()
isPassivationEnabled
in interface org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T extends org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData>
protected org.jboss.cache.Fqn<String> getWebappFqn()
protected org.jboss.web.tomcat.service.session.distributedcache.spi.IncomingDistributableSessionData getDistributableSessionData(String realId, Map<Object,Object> distributedCacheData, boolean includeAttributes)
distributedCacheData
.
Note: This operation may alter the contents of the
passed in map. If this is unacceptable, pass in a defensive copy.
protected abstract Map<String,Object> getSessionAttributes(String realId, Map<Object,Object> distributedCacheData)
distributedCacheData
as a source.
Note: This operation may alter the contents of the
passed in map. If this is unacceptable, pass in a defensive copy.
protected void releaseCacheToManager(String cacheConfigName)
protected Object getMarshalledValue(Object value)
protected Object getUnMarshalledValue(Object obj)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |