| org.jboss.web.tomcat.service.session.ClusteredSession org.jboss.web.tomcat.service.session.JBossCacheClusteredSession org.jboss.web.tomcat.service.session.AttributeBasedClusteredSession
AttributeBasedClusteredSession | class AttributeBasedClusteredSession extends JBossCacheClusteredSession (Code) | | Implementation of a clustered session for the JBossCacheManager. The replication granularity
level is attribute based; that is, we replicate only the dirty attributes.
We use JBossCache for our internal, deplicated data store.
The internal structure is like in JBossCache:
/JSESSION
/hostname
/web_app_path (path + session id is unique)
/id Map(id, session)
(VERSION_KEY, version) // Used for version tracking. version is an Integer.
/ATTRIBUTE Map(attr_key, value)
Note that the isolation level of the cache dictates the
concurrency behavior. Also note that session and its associated attribtues are stored in different nodes.
This will be ok since cache will take care of concurrency. When replicating, we will need to replicate both
session and its attributes.
author: Ben Wang author: Brian Stansberry version: $Revision: 57206 $ |
Field Summary | |
final protected static String | info Descriptive information describing this Session implementation. | final static long | serialVersionUID |
info | final protected static String info(Code) | | Descriptive information describing this Session implementation.
|
serialVersionUID | final static long serialVersionUID(Code) | | |
attributeChanged | protected synchronized void attributeChanged(Object key, Object value, int op)(Code) | | |
clearAttrChangedMaps | protected synchronized void clearAttrChangedMaps()(Code) | | |
getJBossInternalAttributes | protected Map getJBossInternalAttributes()(Code) | | |
getJBossInternalKeys | protected Set getJBossInternalKeys()(Code) | | |
keys | protected String[] keys()(Code) | | Method inherited from Tomcat. Return zero-length based string if not found.
|
populateAttributes | protected void populateAttributes()(Code) | | Populate the attributes stored in the distributed store to local transient ones.
|
processSessionRepl | public synchronized void processSessionRepl()(Code) | | Overrides the superclass version to read in the attributes.
|
recycle | public void recycle()(Code) | | Override the superclass to additionally reset this class' fields.
NOTE: It is not anticipated that this method will be
called on a ClusteredSession, but we are overriding the method to be
thorough.
|
removeJBossInternalAttribute | protected Object removeJBossInternalAttribute(String name, boolean localCall, boolean localOnly)(Code) | | |
removeMyself | public void removeMyself()(Code) | | |
removeMyselfLocal | public void removeMyselfLocal()(Code) | | |
toString | public String toString()(Code) | | Return a string representation of this object.
|
Methods inherited from org.jboss.web.tomcat.service.session.ClusteredSession | public void access()(Code)(Java Doc) public void activate()(Code)(Java Doc) protected boolean canAttributeBeReplicated(Object attribute)(Code)(Java Doc) public void clearOutdated()(Code)(Java Doc) public void endAccess()(Code)(Java Doc) public void expire(boolean notify)(Code)(Java Doc) public void expire(boolean notify, boolean localCall, boolean localOnly)(Code)(Java Doc) public Object getAttribute(String name)(Code)(Java Doc) protected Object getAttributeInternal(String name)(Code)(Java Doc) public Enumeration getAttributeNames()(Code)(Java Doc) protected Map getAttributesInternal()(Code)(Java Doc) public boolean getExceedsMaxUnreplicatedInterval()(Code)(Java Doc) abstract protected Object getJBossInternalAttribute(String name)(Code)(Java Doc) abstract protected Map getJBossInternalAttributes()(Code)(Java Doc) public long getLastReplicated()(Code)(Java Doc) public int getMaxUnreplicatedFactor()(Code)(Java Doc) public long getMaxUnreplicatedInterval()(Code)(Java Doc) public String getRealId()(Code)(Java Doc) public boolean getReplicateSessionBody()(Code)(Java Doc) protected boolean getSessionAttributesDirty()(Code)(Java Doc) protected boolean getSessionMetadataDirty()(Code)(Java Doc) public boolean getUseJK()(Code)(Java Doc) public int getVersion()(Code)(Java Doc) public int incrementVersion()(Code)(Java Doc) abstract public void initAfterLoad(AbstractJBossManager manager)(Code)(Java Doc) public void invalidate()(Code)(Java Doc) protected boolean isGetDirty(Object attribute)(Code)(Java Doc) protected boolean isMutable(Object attribute)(Code)(Java Doc) public boolean isNewData(int version)(Code)(Java Doc) public boolean isOutdated()(Code)(Java Doc) public boolean isSessionDirty()(Code)(Java Doc) public boolean isValid()(Code)(Java Doc) public boolean isValid(boolean expireIfInvalid)(Code)(Java Doc) protected String[] keys()(Code)(Java Doc) public void passivate()(Code)(Java Doc) abstract public void processSessionRepl()(Code)(Java Doc) public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)(Java Doc) public void recycle()(Code)(Java Doc) protected void removeAttributeInternal(String name, boolean notify)(Code)(Java Doc) protected void removeAttributeInternal(String name, boolean localCall, boolean localOnly, boolean notify)(Code)(Java Doc) protected Object removeAttributeInternal(String name, boolean localCall, boolean localOnly)(Code)(Java Doc) protected static Map removeExcludedAttributes(Map attributes)(Code)(Java Doc) protected void removeFromManager(boolean localCall, boolean localOnly)(Code)(Java Doc) abstract protected Object removeJBossInternalAttribute(String name)(Code)(Java Doc) abstract public void removeMyself()(Code)(Java Doc) abstract public void removeMyselfLocal()(Code)(Java Doc) public void resetIdWithRouteInfo(String id)(Code)(Java Doc) protected void sessionAttributesDirty()(Code)(Java Doc) protected void sessionDirty()(Code)(Java Doc) protected void sessionMetadataDirty()(Code)(Java Doc) public void setAttribute(String name, Object value)(Code)(Java Doc) public void setCreationTime(long time)(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) protected Object setInternalAttribute(String name, Object value)(Code)(Java Doc) public void setIsOutdated(boolean outdated)(Code)(Java Doc) abstract protected Object setJBossInternalAttribute(String name, Object value)(Code)(Java Doc) public void setMaxInactiveInterval(int interval)(Code)(Java Doc) public void setMaxUnreplicatedFactor(int factor)(Code)(Java Doc) public void setNew(boolean isNew)(Code)(Java Doc) public void setOutdatedVersion(int version)(Code)(Java Doc) public void setPrincipal(Principal principal)(Code)(Java Doc) public void setValid(boolean isValid)(Code)(Java Doc) public void setVersion(int version)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void updateAccessTimeFromOutdatedTime()(Code)(Java Doc) public void updateLastReplicated()(Code)(Java Doc) public void writeExternal(ObjectOutput out) throws IOException(Code)(Java Doc)
|
|
|