| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="fr"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_201) on Sat May 02 22:20:03 CEST 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>CachingSessionDAO (Apache Shiro 1.5.3 API)</title> |
| <meta name="date" content="2020-05-02"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CachingSessionDAO (Apache Shiro 1.5.3 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"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"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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="typeNameLink">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="typeNameLink">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="https://docs.oracle.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="simpleTagLabel">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="memberSummary" 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="https://docs.oracle.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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#ACTIVE_SESSION_CACHE_NAME">ACTIVE_SESSION_CACHE_NAME</a></span></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="memberSummary" 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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#CachingSessionDAO--">CachingSessionDAO</a></span>()</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <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="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#cache-org.apache.shiro.session.Session-java.io.Serializable-">cache</a></span>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="https://docs.oracle.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 id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><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></span>(<a href="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="https://docs.oracle.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="https://docs.oracle.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 id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#create-org.apache.shiro.session.Session-">create</a></span>(<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 id="i3" 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="https://docs.oracle.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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#createActiveSessionsCache--">createActiveSessionsCache</a></span>()</code> |
| <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> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#delete-org.apache.shiro.session.Session-">delete</a></span>(<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 id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doDelete-org.apache.shiro.session.Session-">doDelete</a></span>(<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 id="i6" class="altColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doUpdate-org.apache.shiro.session.Session-">doUpdate</a></span>(<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 id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessions--">getActiveSessions</a></span>()</code> |
| <div class="block">Returns all active sessions in the system.</div> |
| </td> |
| </tr> |
| <tr id="i8" 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="https://docs.oracle.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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache--">getActiveSessionsCache</a></span>()</code> |
| <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/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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCacheName--">getActiveSessionsCacheName</a></span>()</code> |
| <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="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCachedSession-java.io.Serializable-">getCachedSession</a></span>(<a href="https://docs.oracle.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 id="i11" 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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCachedSession-java.io.Serializable-org.apache.shiro.cache.Cache-">getCachedSession</a></span>(<a href="https://docs.oracle.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="https://docs.oracle.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 id="i12" 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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCacheManager--">getCacheManager</a></span>()</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 id="i13" 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><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#readSession-java.io.Serializable-">readSession</a></span>(<a href="https://docs.oracle.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 id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCache-org.apache.shiro.cache.Cache-">setActiveSessionsCache</a></span>(<a href="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</a><<a href="https://docs.oracle.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 id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCacheName-java.lang.String-">setActiveSessionsCacheName</a></span>(<a href="https://docs.oracle.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 id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager-org.apache.shiro.cache.CacheManager-">setCacheManager</a></span>(<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 id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#uncache-org.apache.shiro.session.Session-">uncache</a></span>(<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 id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#update-org.apache.shiro.session.Session-">update</a></span>(<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="https://docs.oracle.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="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.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="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.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="https://docs.oracle.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="https://docs.oracle.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="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> |
| <!-- ========= 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><span class="overrideSpecifyLabel">Specified by:</span></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="paramLabel">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="returnLabel">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="https://docs.oracle.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="returnLabel">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="https://docs.oracle.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="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 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="https://docs.oracle.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="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 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="https://docs.oracle.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="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="../../../../../../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="https://docs.oracle.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="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 name="create-org.apache.shiro.session.Session-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre>public <a href="https://docs.oracle.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><span class="overrideSpecifyLabel">Specified by:</span></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><span class="overrideSpecifyLabel">Overrides:</span></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="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 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="https://docs.oracle.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="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 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="https://docs.oracle.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="https://docs.oracle.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="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 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="https://docs.oracle.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="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 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="https://docs.oracle.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="https://docs.oracle.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="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 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="https://docs.oracle.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><span class="overrideSpecifyLabel">Specified by:</span></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><span class="overrideSpecifyLabel">Overrides:</span></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="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="../../../../../../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><span class="overrideSpecifyLabel">Specified by:</span></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="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="../../../../../../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="paramLabel">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><span class="overrideSpecifyLabel">Specified by:</span></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="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 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="paramLabel">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="paramLabel">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="https://docs.oracle.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><span class="overrideSpecifyLabel">Specified by:</span></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="returnLabel">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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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="typeNameLink">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="typeNameLink">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–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |