| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>CachingSessionDAO (Apache Shiro :: Core 1.10.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CachingSessionDAO (Apache Shiro :: Core 1.10.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":6,"i6":6,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"><!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* We explicitly disable cookie tracking to avoid privacy issues */ _paq.push(['disableCookies']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo.privacy.apache.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '2']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../index.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" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </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 id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.shiro.session.mgt.eis</a></div> |
| <h2 title="Class CachingSessionDAO" class="title">Class CachingSessionDAO</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="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><code>org.apache.shiro.cache.CacheManagerAware</code>, <code><a href="SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="EnterpriseCacheSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">EnterpriseCacheSessionDAO</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public abstract class <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.48">CachingSessionDAO</a> |
| extends <a href="AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a> |
| implements org.apache.shiro.cache.CacheManagerAware</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="#getActiveSessionsCache()"><code>activeSessionsCache</code></a>. This property is <code>null</code> by default and if one is |
| not explicitly set, a <a href="#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="simpleTagLabel">Since:</span></dt> |
| <dd>0.2</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ACTIVE_SESSION_CACHE_NAME">ACTIVE_SESSION_CACHE_NAME</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The default active sessions cache name, equal to <code>shiro-activeSessionCache</code>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">CachingSessionDAO</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Default no-arg constructor.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cache(org.apache.shiro.session.Session,java.io.Serializable)">cache</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId)</code></th> |
| <td class="colLast"> |
| <div class="block">Caches the specified session under the cache entry key of <code>sessionId</code>.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cache(org.apache.shiro.session.Session,java.io.Serializable,org.apache.shiro.cache.Cache)">cache</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId, |
| org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</code></th> |
| <td class="colLast"> |
| <div class="block">Caches the specified session in the given cache under the key of <code>sessionId</code>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(org.apache.shiro.session.Session)">create</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <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 id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createActiveSessionsCache()">createActiveSessionsCache</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a cache instance used to store active sessions.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#delete(org.apache.shiro.session.Session)">delete</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <div class="block">Removes the specified session from any cache and then permanently deletes the session from the EIS by |
| delegating to <a href="#doDelete(org.apache.shiro.session.Session)"><code>doDelete(org.apache.shiro.session.Session)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doDelete(org.apache.shiro.session.Session)">doDelete</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <div class="block">Subclass implementation hook to permanently delete the given Session from the underlying EIS.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doUpdate(org.apache.shiro.session.Session)">doUpdate</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <div class="block">Subclass implementation hook to actually persist the <code>Session</code>'s state to the underlying EIS.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a><<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getActiveSessions()">getActiveSessions</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all active sessions in the system.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getActiveSessionsCache()">getActiveSessionsCache</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the cache instance to use for storing active sessions.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getActiveSessionsCacheName()">getActiveSessionsCacheName</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the name of the actives sessions cache to be returned by the <code>CacheManager</code>.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCachedSession(java.io.Serializable)">getCachedSession</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId)</code></th> |
| <td class="colLast"> |
| <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 id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCachedSession(java.io.Serializable,org.apache.shiro.cache.Cache)">getCachedSession</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId, |
| org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the Session with the specified id from the specified cache.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>org.apache.shiro.cache.CacheManager</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCacheManager()">getCacheManager</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the CacheManager to use for acquiring the <a href="#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readSession(java.io.Serializable)">readSession</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId)</code></th> |
| <td class="colLast"> |
| <div class="block">Attempts to acquire the Session from the cache first using the session ID as the cache key.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setActiveSessionsCache(org.apache.shiro.cache.Cache)">setActiveSessionsCache</a></span>​(org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a>> cache)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the cache instance to use for storing active sessions.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setActiveSessionsCacheName(java.lang.String)">setActiveSessionsCacheName</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> activeSessionsCacheName)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the name of the active sessions cache to be returned by the <code>CacheManager</code>.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCacheManager(org.apache.shiro.cache.CacheManager)">setCacheManager</a></span>​(org.apache.shiro.cache.CacheManager cacheManager)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the cacheManager to use for acquiring the <a href="#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#uncache(org.apache.shiro.session.Session)">uncache</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <div class="block">Removes the specified Session from the cache.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#update(org.apache.shiro.session.Session)">update</a></span>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <div class="block">Updates the state of the given session to the EIS by first delegating to |
| <a href="#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 id="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="AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a></h3> |
| <code><a href="AbstractSessionDAO.html#assignSessionId(org.apache.shiro.session.Session,java.io.Serializable)">assignSessionId</a>, <a href="AbstractSessionDAO.html#doCreate(org.apache.shiro.session.Session)">doCreate</a>, <a href="AbstractSessionDAO.html#doReadSession(java.io.Serializable)">doReadSession</a>, <a href="AbstractSessionDAO.html#generateSessionId(org.apache.shiro.session.Session)">generateSessionId</a>, <a href="AbstractSessionDAO.html#getSessionIdGenerator()">getSessionIdGenerator</a>, <a href="AbstractSessionDAO.html#setSessionIdGenerator(org.apache.shiro.session.mgt.eis.SessionIdGenerator)">setSessionIdGenerator</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="ACTIVE_SESSION_CACHE_NAME"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ACTIVE_SESSION_CACHE_NAME</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">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="seeLabel">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> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </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> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="setCacheManager(org.apache.shiro.cache.CacheManager)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCacheManager</h4> |
| <pre class="methodSignature">public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.82">setCacheManager</a>​(org.apache.shiro.cache.CacheManager cacheManager)</pre> |
| <div class="block">Sets the cacheManager to use for acquiring the <a href="#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>setCacheManager</code> in interface <code>org.apache.shiro.cache.CacheManagerAware</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cacheManager</code> - the manager to use for constructing the session cache.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCacheManager()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCacheManager</h4> |
| <pre class="methodSignature">public org.apache.shiro.cache.CacheManager <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="#getActiveSessionsCache()"><code>activeSessionsCache</code></a> if |
| one is not configured. That is, the <code>CacheManager</code> will only be used if the |
| <a href="#getActiveSessionsCache()"><code>activeSessionsCache</code></a> property is <code>null</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the CacheManager used by the implementation that creates the activeSessions Cache.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getActiveSessionsCacheName()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getActiveSessionsCacheName</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">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="#setActiveSessionsCacheName(java.lang.String)"><code>setActiveSessionsCacheName(String)</code></a>, defaults to <a href="#ACTIVE_SESSION_CACHE_NAME"><code>ACTIVE_SESSION_CACHE_NAME</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the name of the active sessions cache.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setActiveSessionsCacheName(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setActiveSessionsCacheName</h4> |
| <pre class="methodSignature">public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.113">setActiveSessionsCacheName</a>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">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="#ACTIVE_SESSION_CACHE_NAME"><code>ACTIVE_SESSION_CACHE_NAME</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">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 id="getActiveSessionsCache()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getActiveSessionsCache</h4> |
| <pre class="methodSignature">public org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../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 <code>acquired</code> from the <a href="#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>configured</code></a> |
| <code>CacheManager</code> using the <a href="#getActiveSessionsCacheName()"><code>activeSessionsCacheName</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">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 id="setActiveSessionsCache(org.apache.shiro.cache.Cache)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setActiveSessionsCache</h4> |
| <pre class="methodSignature">public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.137">setActiveSessionsCache</a>​(org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../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 <code>acquired</code> from the <a href="#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>configured</code></a> |
| <code>CacheManager</code> using the <a href="#getActiveSessionsCacheName()"><code>activeSessionsCacheName</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">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="#setCacheManager(org.apache.shiro.cache.CacheManager)"><code>configured</code></a> <code>CacheManager</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createActiveSessionsCache()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createActiveSessionsCache</h4> |
| <pre class="methodSignature">protected org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../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="#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="#getActiveSessionsCacheName()"><code>getActiveSessionsCacheName()</code></a>; |
| cacheManager.getCache(name);</pre></div> |
| <dl> |
| <dt><span class="returnLabel">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 id="create(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.183">create</a>​(<a href="../../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><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SessionDAO.html#create(org.apache.shiro.session.Session)">create</a></code> in interface <code><a href="SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="AbstractSessionDAO.html#create(org.apache.shiro.session.Session)">create</a></code> in class <code><a href="AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - Session object to create in the EIS and then cache.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the EIS id (e.g. primary key) of the created <code>Session</code> object.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCachedSession(java.io.Serializable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCachedSession</h4> |
| <pre class="methodSignature">protected <a href="../../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="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">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="paramLabel">Parameters:</span></dt> |
| <dd><code>sessionId</code> - the id of the cached session to acquire.</dd> |
| <dt><span class="returnLabel">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 id="getCachedSession(java.io.Serializable,org.apache.shiro.cache.Cache)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCachedSession</h4> |
| <pre class="methodSignature">protected <a href="../../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="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId, |
| org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../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="paramLabel">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="returnLabel">Returns:</span></dt> |
| <dd>the cached session, or <code>null</code> if the session wasn't in the cache.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="cache(org.apache.shiro.session.Session,java.io.Serializable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cache</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.227">cache</a>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">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="paramLabel">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="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="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 class="methodSignature">protected void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.246">cache</a>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId, |
| org.apache.shiro.cache.Cache<<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a>,​<a href="../../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="paramLabel">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 id="readSession(java.io.Serializable)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readSession</h4> |
| <pre class="methodSignature">public <a href="../../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="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> sessionId) |
| throws <a href="../../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><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SessionDAO.html#readSession(java.io.Serializable)">readSession</a></code> in interface <code><a href="SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="AbstractSessionDAO.html#readSession(java.io.Serializable)">readSession</a></code> in class <code><a href="AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sessionId</code> - the id of the session to retrieve from the EIS.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the session identified by <code>sessionId</code> in the EIS.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../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 id="update(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>update</h4> |
| <pre class="methodSignature">public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.276">update</a>​(<a href="../../Session.html" title="interface in org.apache.shiro.session">Session</a> session) |
| throws <a href="../../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="#doUpdate(org.apache.shiro.session.Session)"><code>doUpdate(org.apache.shiro.session.Session)</code></a>. If the session is a <a href="../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="../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><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SessionDAO.html#update(org.apache.shiro.session.Session)">update</a></code> in interface <code><a href="SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - the session object to update in the EIS.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../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="../../Session.html#getId()"><code>session.getId()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="doUpdate(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doUpdate</h4> |
| <pre class="methodSignature">protected abstract void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.294">doUpdate</a>​(<a href="../../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="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - the session object whose state will be propagated to the EIS.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="delete(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>delete</h4> |
| <pre class="methodSignature">public void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.302">delete</a>​(<a href="../../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="#doDelete(org.apache.shiro.session.Session)"><code>doDelete(org.apache.shiro.session.Session)</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SessionDAO.html#delete(org.apache.shiro.session.Session)">delete</a></code> in interface <code><a href="SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - the session to remove from caches and permanently delete from the EIS.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="doDelete(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doDelete</h4> |
| <pre class="methodSignature">protected abstract void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.312">doDelete</a>​(<a href="../../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="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - the session instance to permanently delete from the EIS.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="uncache(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uncache</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.319">uncache</a>​(<a href="../../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="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - the session to remove from the cache.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getActiveSessions()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getActiveSessions</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a><<a href="../../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><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SessionDAO.html#getActiveSessions()">getActiveSessions</a></code> in interface <code><a href="SessionDAO.html" title="interface in org.apache.shiro.session.mgt.eis">SessionDAO</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the sessions found in the activeSessions cache.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../index.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" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses.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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </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 id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2004–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |