| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_21) on Thu May 30 15:02:19 PDT 2013 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>CachingSessionDAO (Apache Shiro 1.2.2 API)</title> |
| <meta name="date" content="2013-05-30"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CachingSessionDAO (Apache Shiro 1.2.2 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CachingSessionDAO.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/shiro/session/mgt/eis/EnterpriseCacheSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/shiro/session/mgt/eis/CachingSessionDAO.html" target="_top">Frames</a></li> |
| <li><a href="CachingSessionDAO.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.shiro.session.mgt.eis</div> |
| <h2 title="Class CachingSessionDAO" class="title">Class CachingSessionDAO</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">org.apache.shiro.session.mgt.eis.AbstractSessionDAO</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.session.mgt.eis.CachingSessionDAO</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../../org/apache/shiro/cache/CacheManagerAware.html" title="interface in org.apache.shiro.cache">CacheManagerAware</a>, <a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../../org/apache/shiro/session/mgt/eis/EnterpriseCacheSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">EnterpriseCacheSessionDAO</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.48">CachingSessionDAO</a> |
| extends <a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a> |
| implements <a href="../../../../../../org/apache/shiro/cache/CacheManagerAware.html" title="interface in org.apache.shiro.cache">CacheManagerAware</a></pre> |
| <div class="block">An CachingSessionDAO is a SessionDAO that provides a transparent caching layer between the components that |
| use it and the underlying EIS (Enterprise Information System) session backing store (for example, filesystem, |
| database, enterprise grid/cloud, etc). |
| <p/> |
| This implementation caches all active sessions in a configured |
| <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()"><code>activeSessionsCache</code></a>. This property is <code>null</code> by default and if one is |
| not explicitly set, a <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>cacheManager</code></a> is expected to be configured which will in turn be used |
| to acquire the <code>Cache</code> instance to use for the <code>activeSessionsCache</code>. |
| <p/> |
| All <code>SessionDAO</code> methods are implemented by this class to employ |
| caching behavior and delegates the actual EIS operations to respective do* methods to be implemented by |
| subclasses (doCreate, doRead, etc).</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>0.2</dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#ACTIVE_SESSION_CACHE_NAME">ACTIVE_SESSION_CACHE_NAME</a></strong></code> |
| <div class="block">The default active sessions cache name, equal to <code>shiro-activeSessionCache</code>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#CachingSessionDAO()">CachingSessionDAO</a></strong>()</code> |
| <div class="block">Default no-arg constructor.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#cache(org.apache.shiro.session.Session, java.io.Serializable)">cache</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId)</code> |
| <div class="block">Caches the specified session under the cache entry key of <code>sessionId</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#cache(org.apache.shiro.session.Session, java.io.Serializable, org.apache.shiro.cache.Cache)">cache</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId, |
| <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</code> |
| <div class="block">Caches the specified session in the given cache under the key of <code>sessionId</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#create(org.apache.shiro.session.Session)">create</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code> |
| <div class="block">Calls <code>super.create(session)</code>, then caches the session keyed by the returned <code>sessionId</code>, and then |
| returns this <code>sessionId</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#createActiveSessionsCache()">createActiveSessionsCache</a></strong>()</code> |
| <div class="block">Creates a cache instance used to store active sessions.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#delete(org.apache.shiro.session.Session)">delete</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code> |
| <div class="block">Removes the specified session from any cache and then permanently deletes the session from the EIS by |
| delegating to <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doDelete(org.apache.shiro.session.Session)"><code>doDelete(org.apache.shiro.session.Session)</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doDelete(org.apache.shiro.session.Session)">doDelete</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code> |
| <div class="block">Subclass implementation hook to permanently delete the given Session from the underlying EIS.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doUpdate(org.apache.shiro.session.Session)">doUpdate</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code> |
| <div class="block">Subclass implementation hook to actually persist the <code>Session</code>'s state to the underlying EIS.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessions()">getActiveSessions</a></strong>()</code> |
| <div class="block">Returns all active sessions in the system.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()">getActiveSessionsCache</a></strong>()</code> |
| <div class="block">Returns the cache instance to use for storing active sessions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCacheName()">getActiveSessionsCacheName</a></strong>()</code> |
| <div class="block">Returns the name of the actives sessions cache to be returned by the <code>CacheManager</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCachedSession(java.io.Serializable)">getCachedSession</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId)</code> |
| <div class="block">Returns the cached session with the corresponding <code>sessionId</code> or <code>null</code> if there is |
| no session cached under that id (or if there is no Cache).</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCachedSession(java.io.Serializable, org.apache.shiro.cache.Cache)">getCachedSession</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId, |
| <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</code> |
| <div class="block">Returns the Session with the specified id from the specified cache.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCacheManager()">getCacheManager</a></strong>()</code> |
| <div class="block">Returns the CacheManager to use for acquiring the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#readSession(java.io.Serializable)">readSession</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId)</code> |
| <div class="block">Attempts to acquire the Session from the cache first using the session ID as the cache key.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCache(org.apache.shiro.cache.Cache)">setActiveSessionsCache</a></strong>(<a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</code> |
| <div class="block">Sets the cache instance to use for storing active sessions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCacheName(java.lang.String)">setActiveSessionsCacheName</a></strong>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> activeSessionsCacheName)</code> |
| <div class="block">Sets the name of the active sessions cache to be returned by the <code>CacheManager</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager(org.apache.shiro.cache.CacheManager)">setCacheManager</a></strong>(<a href="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</a> cacheManager)</code> |
| <div class="block">Sets the cacheManager to use for acquiring the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#uncache(org.apache.shiro.session.Session)">uncache</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code> |
| <div class="block">Removes the specified Session from the cache.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#update(org.apache.shiro.session.Session)">update</a></strong>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code> |
| <div class="block">Updates the state of the given session to the EIS by first delegating to |
| <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doUpdate(org.apache.shiro.session.Session)"><code>doUpdate(org.apache.shiro.session.Session)</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_org.apache.shiro.session.mgt.eis.AbstractSessionDAO"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.shiro.session.mgt.eis.<a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a></h3> |
| <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#assignSessionId(org.apache.shiro.session.Session, java.io.Serializable)">assignSessionId</a>, <a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#doCreate(org.apache.shiro.session.Session)">doCreate</a>, <a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#doReadSession(java.io.Serializable)">doReadSession</a>, <a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#generateSessionId(org.apache.shiro.session.Session)">generateSessionId</a>, <a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#getSessionIdGenerator()">getSessionIdGenerator</a>, <a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#setSessionIdGenerator(org.apache.shiro.session.mgt.eis.SessionIdGenerator)">setSessionIdGenerator</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="ACTIVE_SESSION_CACHE_NAME"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ACTIVE_SESSION_CACHE_NAME</h4> |
| <pre>public static final <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.53">ACTIVE_SESSION_CACHE_NAME</a></pre> |
| <div class="block">The default active sessions cache name, equal to <code>shiro-activeSessionCache</code>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.shiro.session.mgt.eis.CachingSessionDAO.ACTIVE_SESSION_CACHE_NAME">Constant Field Values</a></dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="CachingSessionDAO()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>CachingSessionDAO</h4> |
| <pre>public <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.73">CachingSessionDAO</a>()</pre> |
| <div class="block">Default no-arg constructor.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setCacheManager(org.apache.shiro.cache.CacheManager)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCacheManager</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.82">setCacheManager</a>(<a href="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</a> cacheManager)</pre> |
| <div class="block">Sets the cacheManager to use for acquiring the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/cache/CacheManagerAware.html#setCacheManager(org.apache.shiro.cache.CacheManager)">setCacheManager</a></code> in interface <code><a href="../../../../../../org/apache/shiro/cache/CacheManagerAware.html" title="interface in org.apache.shiro.cache">CacheManagerAware</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>cacheManager</code> - the manager to use for constructing the session cache.</dd></dl> |
| </li> |
| </ul> |
| <a name="getCacheManager()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCacheManager</h4> |
| <pre>public <a href="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.93">getCacheManager</a>()</pre> |
| <div class="block">Returns the CacheManager to use for acquiring the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured. That is, the <code>CacheManager</code> will only be used if the |
| <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()"><code>activeSessionsCache</code></a> property is <code>null</code>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the CacheManager used by the implementation that creates the activeSessions Cache.</dd></dl> |
| </li> |
| </ul> |
| <a name="getActiveSessionsCacheName()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getActiveSessionsCacheName</h4> |
| <pre>public <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.103">getActiveSessionsCacheName</a>()</pre> |
| <div class="block">Returns the name of the actives sessions cache to be returned by the <code>CacheManager</code>. Unless |
| overridden by <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCacheName(java.lang.String)"><code>setActiveSessionsCacheName(String)</code></a>, defaults to <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#ACTIVE_SESSION_CACHE_NAME"><code>ACTIVE_SESSION_CACHE_NAME</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the name of the active sessions cache.</dd></dl> |
| </li> |
| </ul> |
| <a name="setActiveSessionsCacheName(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setActiveSessionsCacheName</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.113">setActiveSessionsCacheName</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> activeSessionsCacheName)</pre> |
| <div class="block">Sets the name of the active sessions cache to be returned by the <code>CacheManager</code>. Defaults to |
| <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#ACTIVE_SESSION_CACHE_NAME"><code>ACTIVE_SESSION_CACHE_NAME</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>activeSessionsCacheName</code> - the name of the active sessions cache to be returned by the <code>CacheManager</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getActiveSessionsCache()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getActiveSessionsCache</h4> |
| <pre>public <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.125">getActiveSessionsCache</a>()</pre> |
| <div class="block">Returns the cache instance to use for storing active sessions. If one is not available (it is <code>null</code>), |
| it will be <a href="../../../../../../org/apache/shiro/cache/CacheManager.html#getCache(java.lang.String)"><code>acquired</code></a> from the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>configured</code></a> |
| <code>CacheManager</code> using the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCacheName()"><code>activeSessionsCacheName</code></a>.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the cache instance to use for storing active sessions or <code>null</code> if the <code>Cache</code> instance |
| should be retrieved from the</dd></dl> |
| </li> |
| </ul> |
| <a name="setActiveSessionsCache(org.apache.shiro.cache.Cache)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setActiveSessionsCache</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.137">setActiveSessionsCache</a>(<a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</pre> |
| <div class="block">Sets the cache instance to use for storing active sessions. If one is not set (it remains <code>null</code>), |
| it will be <a href="../../../../../../org/apache/shiro/cache/CacheManager.html#getCache(java.lang.String)"><code>acquired</code></a> from the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>configured</code></a> |
| <code>CacheManager</code> using the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCacheName()"><code>activeSessionsCacheName</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>cache</code> - the cache instance to use for storing active sessions or <code>null</code> if the cache is to be |
| acquired from the <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>configured</code></a> <code>CacheManager</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="createActiveSessionsCache()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createActiveSessionsCache</h4> |
| <pre>protected <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.167">createActiveSessionsCache</a>()</pre> |
| <div class="block">Creates a cache instance used to store active sessions. Creation is done by first |
| <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCacheManager()"><code>acquiring</code></a> the <code>CacheManager</code>. If the cache manager is not null, the |
| cache returned is that resulting from the following call: |
| <pre> String name = <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCacheName()"><code>getActiveSessionsCacheName()</code></a>; |
| cacheManager.getCache(name);</pre></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a cache instance used to store active sessions, or <code>null</code> if the <code>CacheManager</code> has |
| not been set.</dd></dl> |
| </li> |
| </ul> |
| <a name="create(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre>public <a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.183">create</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| <div class="block">Calls <code>super.create(session)</code>, then caches the session keyed by the returned <code>sessionId</code>, and then |
| returns this <code>sessionId</code>.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html#create(org.apache.shiro.session.Session)">create</a></code> in interface <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#create(org.apache.shiro.session.Session)">create</a></code> in class <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - Session object to create in the EIS and then cache.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the EIS id (e.g. primary key) of the created <code>Session</code> object.</dd></dl> |
| </li> |
| </ul> |
| <a name="getCachedSession(java.io.Serializable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCachedSession</h4> |
| <pre>protected <a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.197">getCachedSession</a>(<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId)</pre> |
| <div class="block">Returns the cached session with the corresponding <code>sessionId</code> or <code>null</code> if there is |
| no session cached under that id (or if there is no Cache).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>sessionId</code> - the id of the cached session to acquire.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the cached session with the corresponding <code>sessionId</code>, or <code>null</code> if the session |
| does not exist or is not cached.</dd></dl> |
| </li> |
| </ul> |
| <a name="getCachedSession(java.io.Serializable, org.apache.shiro.cache.Cache)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCachedSession</h4> |
| <pre>protected <a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.216">getCachedSession</a>(<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId, |
| <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</pre> |
| <div class="block">Returns the Session with the specified id from the specified cache. This method simply calls |
| <code>cache.get(sessionId)</code> and can be overridden by subclasses for custom acquisition behavior.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>sessionId</code> - the id of the session to acquire.</dd><dd><code>cache</code> - the cache to acquire the session from</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the cached session, or <code>null</code> if the session wasn't in the cache.</dd></dl> |
| </li> |
| </ul> |
| <a name="cache(org.apache.shiro.session.Session, java.io.Serializable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cache</h4> |
| <pre>protected void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.227">cache</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId)</pre> |
| <div class="block">Caches the specified session under the cache entry key of <code>sessionId</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session to cache</dd><dd><code>sessionId</code> - the session id, to be used as the cache entry key.</dd><dt><span class="strong">Since:</span></dt> |
| <dd>1.0</dd></dl> |
| </li> |
| </ul> |
| <a name="cache(org.apache.shiro.session.Session, java.io.Serializable, org.apache.shiro.cache.Cache)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cache</h4> |
| <pre>protected void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.246">cache</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId, |
| <a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>,<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</pre> |
| <div class="block">Caches the specified session in the given cache under the key of <code>sessionId</code>. This implementation |
| simply calls <code>cache.put(sessionId,session)</code> and can be overridden for custom behavior.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session to cache</dd><dd><code>sessionId</code> - the id of the session, expected to be the cache key.</dd><dd><code>cache</code> - the cache to store the session</dd></dl> |
| </li> |
| </ul> |
| <a name="readSession(java.io.Serializable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readSession</h4> |
| <pre>public <a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.258">readSession</a>(<a href="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a> sessionId) |
| throws <a href="../../../../../../org/apache/shiro/session/UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</a></pre> |
| <div class="block">Attempts to acquire the Session from the cache first using the session ID as the cache key. If no session |
| is found, <code>super.readSession(sessionId)</code> is called to perform the actual retrieval.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html#readSession(java.io.Serializable)">readSession</a></code> in interface <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html#readSession(java.io.Serializable)">readSession</a></code> in class <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>sessionId</code> - the id of the session to retrieve from the EIS.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the session identified by <code>sessionId</code> in the EIS.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</a></code> - if the id specified does not correspond to any session in the cache or EIS.</dd></dl> |
| </li> |
| </ul> |
| <a name="update(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>update</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.276">update</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session) |
| throws <a href="../../../../../../org/apache/shiro/session/UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</a></pre> |
| <div class="block">Updates the state of the given session to the EIS by first delegating to |
| <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doUpdate(org.apache.shiro.session.Session)"><code>doUpdate(org.apache.shiro.session.Session)</code></a>. If the session is a <a href="../../../../../../org/apache/shiro/session/mgt/ValidatingSession.html" title="interface in org.apache.shiro.session.mgt"><code>ValidatingSession</code></a>, it will |
| be added to the cache only if it is <a href="../../../../../../org/apache/shiro/session/mgt/ValidatingSession.html#isValid()"><code>ValidatingSession.isValid()</code></a> and if invalid, will be removed from the |
| cache. If it is not a <code>ValidatingSession</code> instance, it will be added to the cache in any event.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html#update(org.apache.shiro.session.Session)">update</a></code> in interface <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session object to update in the EIS.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</a></code> - if no existing EIS session record exists with the |
| identifier of <a href="../../../../../../org/apache/shiro/session/Session.html#getId()"><code>session.getId()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="doUpdate(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doUpdate</h4> |
| <pre>protected abstract void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.294">doUpdate</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| <div class="block">Subclass implementation hook to actually persist the <code>Session</code>'s state to the underlying EIS.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session object whose state will be propagated to the EIS.</dd></dl> |
| </li> |
| </ul> |
| <a name="delete(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>delete</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.302">delete</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| <div class="block">Removes the specified session from any cache and then permanently deletes the session from the EIS by |
| delegating to <a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doDelete(org.apache.shiro.session.Session)"><code>doDelete(org.apache.shiro.session.Session)</code></a>.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html#delete(org.apache.shiro.session.Session)">delete</a></code> in interface <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session to remove from caches and permanently delete from the EIS.</dd></dl> |
| </li> |
| </ul> |
| <a name="doDelete(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doDelete</h4> |
| <pre>protected abstract void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.312">doDelete</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| <div class="block">Subclass implementation hook to permanently delete the given Session from the underlying EIS.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session instance to permanently delete from the EIS.</dd></dl> |
| </li> |
| </ul> |
| <a name="uncache(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uncache</h4> |
| <pre>protected void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.319">uncache</a>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| <div class="block">Removes the specified Session from the cache.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>session</code> - the session to remove from the cache.</dd></dl> |
| </li> |
| </ul> |
| <a name="getActiveSessions()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getActiveSessions</h4> |
| <pre>public <a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a>> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.342">getActiveSessions</a>()</pre> |
| <div class="block">Returns all active sessions in the system. |
| <p/> |
| <p>This implementation merely returns the sessions found in the activeSessions cache. Subclass implementations |
| may wish to override this method to retrieve them in a different way, perhaps by an RDBMS query or by other |
| means.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html#getActiveSessions()">getActiveSessions</a></code> in interface <code><a href="../../../../../../org/apache/shiro/session/mgt/eis/SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the sessions found in the activeSessions cache.</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CachingSessionDAO.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/shiro/session/mgt/eis/EnterpriseCacheSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/shiro/session/mgt/eis/CachingSessionDAO.html" target="_top">Frames</a></li> |
| <li><a href="CachingSessionDAO.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2004-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |
| |