org.jboss.web.tomcat.service.session.distributedcache.impl.jbc
Class SessionBasedJBossCacheService
java.lang.Object
org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService<org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData>
org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.SessionBasedJBossCacheService
- All Implemented Interfaces:
- org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData>
public class SessionBasedJBossCacheService
- extends AbstractJBossCacheService<org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData>
DistributedCacheManager impl for ReplicationGranularity.SESSION.
Fields inherited from class org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService |
ATTRIBUTE_KEY, batchingManager, BUDDY_BACKUP, BUDDY_BACKUP_FQN, cacheConfigName_, cacheWrapper_, combinedPath_, FQN_DELIMITER, INTERNAL_KEYS, log_, METADATA_KEY, SESSION, TIMESTAMP_KEY, VERSION_KEY |
Method Summary |
Object |
getAttribute(String realId,
String key)
|
Set<String> |
getAttributeKeys(String realId)
Obtain the keys associated with this fqn. |
Map<String,Object> |
getAttributes(String realId)
Return all attributes associated with this session id. |
protected Map<String,Object> |
getSessionAttributes(String realId,
Map<Object,Object> distributedCacheData)
Returns the session attributes, possibly using the passed in
distributedCacheData as a source. |
boolean |
getSupportsAttributeOperations()
|
void |
putAttribute(String realId,
Map<String,Object> map)
|
void |
putAttribute(String realId,
String key,
Object value)
|
Object |
removeAttribute(String realId,
String key)
|
void |
removeAttributeLocal(String realId,
String key)
|
protected void |
storeSessionAttributes(Map<Object,Object> dataMap,
org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData sessionData)
|
Methods inherited from class org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService |
evictSession, evictSession, getBatchingManager, getBuddyBackupSessionFqn, getCache, getChildrenNames, getCombinedPath, getDistributableSessionData, getManager, getMarshalledValue, getSessionData, getSessionData, getSessionFqn, getSessionIds, getUnMarshalledValue, getWebappFqn, isMarshallingAvailable, isPassivationEnabled, releaseCacheToManager, removeSession, removeSessionLocal, removeSessionLocal, removeSessionRegion, sessionCreated, setCache, setupSessionRegion, start, stop, storeSessionData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SessionBasedJBossCacheService
public SessionBasedJBossCacheService(org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager localManager)
throws org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException
- Throws:
org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException
SessionBasedJBossCacheService
public SessionBasedJBossCacheService(org.jboss.web.tomcat.service.session.distributedcache.spi.LocalDistributableSessionManager localManager,
org.jboss.cache.Cache<Object,Object> cache)
getSupportsAttributeOperations
public boolean getSupportsAttributeOperations()
getAttribute
public Object getAttribute(String realId,
String key)
putAttribute
public void putAttribute(String realId,
String key,
Object value)
putAttribute
public void putAttribute(String realId,
Map<String,Object> map)
removeAttribute
public Object removeAttribute(String realId,
String key)
removeAttributeLocal
public void removeAttributeLocal(String realId,
String key)
getAttributeKeys
public Set<String> getAttributeKeys(String realId)
- Obtain the keys associated with this fqn. Note that it is not the fqn children.
getAttributes
public Map<String,Object> getAttributes(String realId)
- Return all attributes associated with this session id.
- Parameters:
realId
- the session id with any jvmRoute removed
- Returns:
- the attributes, or any empty Map if none are found.
getSessionAttributes
protected Map<String,Object> getSessionAttributes(String realId,
Map<Object,Object> distributedCacheData)
- Returns the session attributes, possibly using the passed in
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.
- Specified by:
getSessionAttributes
in class AbstractJBossCacheService<org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData>
storeSessionAttributes
protected void storeSessionAttributes(Map<Object,Object> dataMap,
org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData sessionData)
- Specified by:
storeSessionAttributes
in class AbstractJBossCacheService<org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingSessionGranularitySessionData>
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.