| Modifier and Type | Class and Description |
|---|---|
| protected class | JDBCSessionManager.ClassLoadingObjectInputStream
ClassLoadingObjectInputStream |
| public class | JDBCSessionManager.Session
Session Session instance in memory of this node. |
| public class | JDBCSessionManager.SessionData
SessionData Persistable data about a session. |
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected String | |
| protected String | |
| protected String | |
| protected String | |
| protected String | |
| protected long | |
| private ConcurrentHashMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addSession(AbstractSessionManager.
Implements abstract org. |
| private String | calculateRowId(JDBCSessionManager.
Calculate a unique id for this session across the cluster. |
| private String | |
| protected void | |
| public void | doStart()
Overrides org. |
| public void | doStop()
Overrides org. |
| protected void | |
| private Connection | |
| public long | |
| public JDBCSessionManager. | getSession(String
The session ID in the cluster, stripped of any worker name. idInCluster)Implements abstract org. |
| public Map | getSessionMap()
Implements abstract org. |
| public int | getSessions()
Implements abstract org. |
| private String | Returns: 0.0.0.0 if no virtual host is definedGet the first virtual host for the context. |
| protected void | |
| protected void | invalidateSessions()
Implements abstract org. |
| protected JDBCSessionManager. | |
| protected AbstractSessionManager. | newSession(HttpServletRequest request)
Implements abstract org. |
| protected void | |
| protected void | removeSession(String idInCluster)
Implements abstract org. |
| public void | removeSession(AbstractSessionManager.
The session to remove session,True if invalidate)HttpSessionListener#sessionDestroyed(HttpSessionEvent) and
SessionIdManager#invalidateAll(String) should be called.Overrides org. |
| public void | setSaveInterval(long sec)
Set the time in seconds which is the interval between saving the session access time to the database. |
| protected void | |
| protected void | |
| private void | updateSessionAccessTime(JDBCSessionManager.
Persist the time the session was last accessed. |
| protected void | updateSessionNode(JDBCSessionManager.
Update the node on which the session was last seen to be my node. |
| __deleteSession | back to summary |
|---|---|
| protected String __deleteSession | |
| __insertSession | back to summary |
|---|---|
| protected String __insertSession | |
| __selectSession | back to summary |
|---|---|
| protected String __selectSession | |
| __updateSession | back to summary |
|---|---|
| protected String __updateSession | |
| __updateSessionAccessTime | back to summary |
|---|---|
| protected String __updateSessionAccessTime | |
| __updateSessionNode | back to summary |
|---|---|
| protected String __updateSessionNode | |
| _saveIntervalSec | back to summary |
|---|---|
| protected long _saveIntervalSec | |
| _sessions | back to summary |
|---|---|
| private ConcurrentHashMap<K, V> _sessions | |
| JDBCSessionManager | back to summary |
|---|---|
| public JDBCSessionManager() | |
| addSession | back to summary |
|---|---|
| protected void addSession(AbstractSessionManager. Implements abstract org. Add a newly created session to our in-memory list for this node and persist it. | |
| calculateRowId | back to summary |
|---|---|
| private String calculateRowId(JDBCSessionManager. Calculate a unique id for this session across the cluster. Unique id is composed of: contextpath_virtualhost0_sessionid | |
| canonicalize | back to summary |
|---|---|
| private String canonicalize(String path) Make an acceptable file name from a context path. | |
| deleteSession | back to summary |
|---|---|
| protected void deleteSession(JDBCSessionManager. Delete a session from the database. Should only be called when the session has been invalidated. | |
| doStart | back to summary |
|---|---|
| public void doStart() throws Exception Overrides org. Start the session manager. | |
| doStop | back to summary |
|---|---|
| public void doStop() throws Exception Overrides org. Stop the session manager. | |
| expire | back to summary |
|---|---|
| protected void expire(List<E> sessionIds) Expire any Sessions we have in memory matching the list of expired Session ids. | |
| getConnection | back to summary |
|---|---|
| private Connection getConnection() throws SQLException Get a connection from the driver. | |
| getSaveInterval | back to summary |
|---|---|
| public long getSaveInterval() | |
| getSession | back to summary |
|---|---|
| public JDBCSessionManager. Implements abstract org. A session has been requested by it's id on this node. Load the session by id AND context path from the database. Multiple contexts may share the same session id (due to dispatching) but they CANNOT share the same contents. Check if last node id is my node id, if so, then the session we have in memory cannot be stale. If another node used the session last, then we need to refresh from the db. Note this method will go to the database, so if you only want to check for the existence of a Session in memory, use _sessions.get(id) instead.
| |
| getSessionMap | back to summary |
|---|---|
| public Map Implements abstract org. Get all the sessions as a map of id to Session. | |
| getSessions | back to summary |
|---|---|
| public int getSessions() Implements abstract org. Get the number of sessions. | |
| getVirtualHost | back to summary |
|---|---|
| private String getVirtualHost(ContextHandler. Get the first virtual host for the context. Used to help identify the exact session/contextPath.
| |
| invalidateSession | back to summary |
|---|---|
| protected void invalidateSession(String idInCluster) Invalidate a session. | |
| invalidateSessions | back to summary |
|---|---|
| protected void invalidateSessions() Implements abstract org. | |
| loadSession | back to summary |
|---|---|
| protected JDBCSessionManager. Load a session from the database | |
| newSession | back to summary |
|---|---|
| protected AbstractSessionManager. Implements abstract org. Make a new Session. | |
| prepareTables | back to summary |
|---|---|
| protected void prepareTables() | |
| removeSession | back to summary |
|---|---|
| protected void removeSession(String idInCluster) Implements abstract org. Delete an existing session, both from the in-memory map and the database. | |
| removeSession | back to summary |
|---|---|
| public void removeSession(AbstractSessionManager. Overrides org. Remove session from manager
| |
| setSaveInterval | back to summary |
|---|---|
| public void setSaveInterval(long sec) Set the time in seconds which is the interval between saving the session access time to the database. This is an optimization that prevents the database from being overloaded when a session is accessed very frequently. On session exit, if the session attributes have NOT changed, the time at which we last saved the accessed time is compared to the current accessed time. If the interval is at least saveIntervalSecs, then the access time will be persisted to the database. If any session attribute does change, then the attributes and the accessed time are persisted. | |
| storeSession | back to summary |
|---|---|
| protected void storeSession(JDBCSessionManager. Insert a session into the database. | |
| updateSession | back to summary |
|---|---|
| protected void updateSession(JDBCSessionManager. Update data on an existing persisted session. | |
| updateSessionAccessTime | back to summary |
|---|---|
| private void updateSessionAccessTime(JDBCSessionManager. Persist the time the session was last accessed. | |
| updateSessionNode | back to summary |
|---|---|
| protected void updateSessionNode(JDBCSessionManager. Update the node on which the session was last seen to be my node. | |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Class | resolveClass(ObjectStreamClass
an instance of class cl)ObjectStreamClassOverrides java. |
| ClassLoadingObjectInputStream | back to summary |
|---|---|
| public ClassLoadingObjectInputStream(InputStream in) throws IOException | |
| ClassLoadingObjectInputStream | back to summary |
|---|---|
| public ClassLoadingObjectInputStream() throws IOException | |
| resolveClass | back to summary |
|---|---|
| public Class Overrides java. Doc from java. Load the local class equivalent of the specified stream class description. Subclasses may implement this method to allow classes to be fetched from an alternate source. The corresponding method in The default implementation of this method in
Class.forName(desc.getName(), false, loader) loader is the first class loader on the current
thread's stack (starting from the currently executing method) that is
neither the platform
class loader nor its ancestor; otherwise, loader is the
platform class loader. If this call results in a
ClassNotFoundException and the name of the passed
ObjectStreamClass instance is the Java language keyword
for a primitive type or void, then the Class object
representing that primitive type or void will be returned
(e.g., an ObjectStreamClass with the name
"int" will be resolved to Integer.TYPE).
Otherwise, the ClassNotFoundException will be thrown to
the caller of this method.
| |
| Modifier and Type | Field and Description |
|---|---|
| private JDBCSessionManager. | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | access(long time)
Overrides org. |
| protected void | complete()
Overrides org. |
| protected void | |
| protected Map | newAttributeMap()
Implements abstract org. |
| public void | removeAttribute(String
the name of the object to
remove from this session name)Overrides org. Implements javax. |
| public void | setAttribute(String
the name to which the object is bound;
cannot be null name, Object the object to be bound value)Overrides org. Implements javax. |
| protected void |
| _data | back to summary |
|---|---|
| private JDBCSessionManager. | |
| _dirty | back to summary |
|---|---|
| private boolean _dirty | |
| Session | back to summary |
|---|---|
| protected Session(HttpServletRequest request) Session from a request. | |
| Session | back to summary |
|---|---|
| protected Session(JDBCSessionManager. Session restored in database. | |
| access | back to summary |
|---|---|
| protected void access(long time) Overrides org. Entry to session. Called by SessionHandler on inbound request and the session already exists in this node's memory. | |
| complete | back to summary |
|---|---|
| protected void complete() Overrides org. Exit from session | |
| cookieSet | back to summary |
|---|---|
| protected void cookieSet() Overrides org. | |
| newAttributeMap | back to summary |
|---|---|
| protected Map Implements abstract org. | |
| removeAttribute | back to summary |
|---|---|
| public void removeAttribute(String name) Overrides org. Implements javax. Doc from javax. Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing. After this method executes, and if the object
implements
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String name, Object value) Overrides org. Implements javax. Doc from javax. Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced. After this method executes, and if the new object
implements If an object was already bound to this session of this name
that implements If the value passed in is null, this has the same effect as calling
| |
| timeout | back to summary |
|---|---|
| protected void timeout() throws IllegalStateException Overrides org. | |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private Map | |
| private String | |
| private long | |
| private long | |
| private long | |
| private String | |
| private long | |
| private String | |
| private long | |
| private long | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized long | |
| protected synchronized Map | |
| public synchronized String | |
| public synchronized long | |
| public synchronized long | |
| public synchronized long | |
| public synchronized String | |
| public synchronized long | |
| public synchronized String | |
| public synchronized long | |
| public synchronized long | |
| protected synchronized String | |
| public synchronized String | |
| protected synchronized void | |
| protected synchronized void | |
| public synchronized void | |
| public void | |
| protected synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public synchronized void | |
| public String |
| _accessed | back to summary |
|---|---|
| private long _accessed | |
| _attributes | back to summary |
|---|---|
| private Map<K, V> _attributes | |
| _canonicalContext | back to summary |
|---|---|
| private String _canonicalContext | |
| _cookieSet | back to summary |
|---|---|
| private long _cookieSet | |
| _created | back to summary |
|---|---|
| private long _created | |
| _expiryTime | back to summary |
|---|---|
| private long _expiryTime | |
| _id | back to summary |
|---|---|
| private String _id | |
| _lastAccessed | back to summary |
|---|---|
| private long _lastAccessed | |
| _lastNode | back to summary |
|---|---|
| private String _lastNode | |
| _lastSaved | back to summary |
|---|---|
| private long _lastSaved | |
| _maxIdleMs | back to summary |
|---|---|
| private long _maxIdleMs | |
| _rowId | back to summary |
|---|---|
| private String _rowId | |
| _virtualHost | back to summary |
|---|---|
| private String _virtualHost | |
| SessionData | back to summary |
|---|---|
| public SessionData(String sessionId) | |
| getAccessed | back to summary |
|---|---|
| public synchronized long getAccessed() | |
| getAttributeMap | back to summary |
|---|---|
| protected synchronized Map | |
| getCanonicalContext | back to summary |
|---|---|
| public synchronized String getCanonicalContext() | |
| getCookieSet | back to summary |
|---|---|
| public synchronized long getCookieSet() | |
| getCreated | back to summary |
|---|---|
| public synchronized long getCreated() | |
| getExpiryTime | back to summary |
|---|---|
| public synchronized long getExpiryTime() | |
| getId | back to summary |
|---|---|
| public synchronized String getId() | |
| getLastAccessed | back to summary |
|---|---|
| public synchronized long getLastAccessed() | |
| getLastNode | back to summary |
|---|---|
| public synchronized String getLastNode() | |
| getLastSaved | back to summary |
|---|---|
| public synchronized long getLastSaved() | |
| getMaxIdleMs | back to summary |
|---|---|
| public synchronized long getMaxIdleMs() | |
| getRowId | back to summary |
|---|---|
| protected synchronized String getRowId() | |
| getVirtualHost | back to summary |
|---|---|
| public synchronized String getVirtualHost() | |
| setAccessed | back to summary |
|---|---|
| protected synchronized void setAccessed(long ms) | |
| setAttributeMap | back to summary |
|---|---|
| protected synchronized void setAttributeMap(ConcurrentHashMap<K, V> map) | |
| setCanonicalContext | back to summary |
|---|---|
| public synchronized void setCanonicalContext(String str) | |
| setCookieSet | back to summary |
|---|---|
| public void setCookieSet(long ms) | |
| setCreated | back to summary |
|---|---|
| protected synchronized void setCreated(long ms) | |
| setExpiryTime | back to summary |
|---|---|
| public synchronized void setExpiryTime(long time) | |
| setLastAccessed | back to summary |
|---|---|
| public synchronized void setLastAccessed(long ms) | |
| setLastNode | back to summary |
|---|---|
| public synchronized void setLastNode(String node) | |
| setLastSaved | back to summary |
|---|---|
| public synchronized void setLastSaved(long time) | |
| setMaxIdleMs | back to summary |
|---|---|
| public synchronized void setMaxIdleMs(long ms) | |
| setRowId | back to summary |
|---|---|
| public synchronized void setRowId(String rowId) | |
| setVirtualHost | back to summary |
|---|---|
| public synchronized void setVirtualHost(String vhost) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |