blob: 7fc6f4a00a842b58b46503598483c67ac8393f08 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_65) on Tue Feb 25 18:15:50 EST 2014 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
CachingSessionDAO (Apache Shiro 1.2.3 API)
</TITLE>
<META NAME="date" CONTENT="2014-02-25">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CachingSessionDAO (Apache Shiro 1.2.3 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CachingSessionDAO.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/shiro/session/mgt/eis/EnterpriseCacheSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/shiro/session/mgt/eis/CachingSessionDAO.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CachingSessionDAO.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.shiro.session.mgt.eis</FONT>
<BR>
Class CachingSessionDAO</H2>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><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>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.shiro.session.mgt.eis.CachingSessionDAO</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <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><B>Direct Known Subclasses:</B> <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>
<DL>
<DT><PRE>public abstract class <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.48"><B>CachingSessionDAO</B></A><DT>extends <A HREF="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis">AbstractSessionDAO</A><DT>implements <A HREF="../../../../../../org/apache/shiro/cache/CacheManagerAware.html" title="interface in org.apache.shiro.cache">CacheManagerAware</A></DL>
</PRE>
<P>
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).
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>0.2</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#ACTIVE_SESSION_CACHE_NAME">ACTIVE_SESSION_CACHE_NAME</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default active sessions cache name, equal to <code>shiro-activeSessionCache</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#CachingSessionDAO()">CachingSessionDAO</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default no-arg constructor.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#cache(org.apache.shiro.session.Session, java.io.Serializable)">cache</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session,
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Caches the specified session under the cache entry key of <code>sessionId</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><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></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session,
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId,
<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;&nbsp;cache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Caches the specified session in the given cache under the key of <code>sessionId</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#create(org.apache.shiro.session.Session)">create</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls <code>super.create(session)</code>, then caches the session keyed by the returned <code>sessionId</code>, and then
returns this <code>sessionId</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#createActiveSessionsCache()">createActiveSessionsCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a cache instance used to store active sessions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#delete(org.apache.shiro.session.Session)">delete</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doDelete(org.apache.shiro.session.Session)">doDelete</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subclass implementation hook to permanently delete the given Session from the underlying EIS.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#doUpdate(org.apache.shiro.session.Session)">doUpdate</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subclass implementation hook to actually persist the <code>Session</code>'s state to the underlying EIS.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessions()">getActiveSessions</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all active sessions in the system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCache()">getActiveSessionsCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the cache instance to use for storing active sessions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getActiveSessionsCacheName()">getActiveSessionsCacheName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the actives sessions cache to be returned by the <code>CacheManager</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCachedSession(java.io.Serializable)">getCachedSession</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCachedSession(java.io.Serializable, org.apache.shiro.cache.Cache)">getCachedSession</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId,
<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;&nbsp;cache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Session with the specified id from the specified cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#getCacheManager()">getCacheManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#readSession(java.io.Serializable)">readSession</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempts to acquire the Session from the cache first using the session ID as the cache key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCache(org.apache.shiro.cache.Cache)">setActiveSessionsCache</A></B>(<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;&nbsp;cache)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the cache instance to use for storing active sessions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setActiveSessionsCacheName(java.lang.String)">setActiveSessionsCacheName</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;activeSessionsCacheName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the name of the active sessions cache to be returned by the <code>CacheManager</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#setCacheManager(org.apache.shiro.cache.CacheManager)">setCacheManager</A></B>(<A HREF="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</A>&nbsp;cacheManager)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#uncache(org.apache.shiro.session.Session)">uncache</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the specified Session from the cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#update(org.apache.shiro.session.Session)">update</A></B>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.session.mgt.eis.AbstractSessionDAO"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>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></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><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></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ACTIVE_SESSION_CACHE_NAME"><!-- --></A><H3>
ACTIVE_SESSION_CACHE_NAME</H3>
<PRE>
public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.53"><B>ACTIVE_SESSION_CACHE_NAME</B></A></PRE>
<DL>
<DD>The default active sessions cache name, equal to <code>shiro-activeSessionCache</code>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.shiro.session.mgt.eis.CachingSessionDAO.ACTIVE_SESSION_CACHE_NAME">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="CachingSessionDAO()"><!-- --></A><H3>
CachingSessionDAO</H3>
<PRE>
public <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.73"><B>CachingSessionDAO</B></A>()</PRE>
<DL>
<DD>Default no-arg constructor.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setCacheManager(org.apache.shiro.cache.CacheManager)"><!-- --></A><H3>
setCacheManager</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.82"><B>setCacheManager</B></A>(<A HREF="../../../../../../org/apache/shiro/cache/CacheManager.html" title="interface in org.apache.shiro.cache">CacheManager</A>&nbsp;cacheManager)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Specified by:</B><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></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheManager</CODE> - the manager to use for constructing the session cache.</DL>
</DD>
</DL>
<HR>
<A NAME="getCacheManager()"><!-- --></A><H3>
getCacheManager</H3>
<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"><B>getCacheManager</B></A>()</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the CacheManager used by the implementation that creates the activeSessions Cache.</DL>
</DD>
</DL>
<HR>
<A NAME="getActiveSessionsCacheName()"><!-- --></A><H3>
getActiveSessionsCacheName</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.103"><B>getActiveSessionsCacheName</B></A>()</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the active sessions cache.</DL>
</DD>
</DL>
<HR>
<A NAME="setActiveSessionsCacheName(java.lang.String)"><!-- --></A><H3>
setActiveSessionsCacheName</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.113"><B>setActiveSessionsCacheName</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;activeSessionsCacheName)</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>activeSessionsCacheName</CODE> - the name of the active sessions cache to be returned by the <code>CacheManager</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getActiveSessionsCache()"><!-- --></A><H3>
getActiveSessionsCache</H3>
<PRE>
public <A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt; <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.125"><B>getActiveSessionsCache</B></A>()</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><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</DL>
</DD>
</DL>
<HR>
<A NAME="setActiveSessionsCache(org.apache.shiro.cache.Cache)"><!-- --></A><H3>
setActiveSessionsCache</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.137"><B>setActiveSessionsCache</B></A>(<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;&nbsp;cache)</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><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>.</DL>
</DD>
</DL>
<HR>
<A NAME="createActiveSessionsCache()"><!-- --></A><H3>
createActiveSessionsCache</H3>
<PRE>
protected <A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt; <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.167"><B>createActiveSessionsCache</B></A>()</PRE>
<DL>
<DD>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>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a cache instance used to store active sessions, or <code>null</code> if the <code>CacheManager</code> has
not been set.</DL>
</DD>
</DL>
<HR>
<A NAME="create(org.apache.shiro.session.Session)"><!-- --></A><H3>
create</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A> <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.183"><B>create</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</PRE>
<DL>
<DD>Calls <code>super.create(session)</code>, then caches the session keyed by the returned <code>sessionId</code>, and then
returns this <code>sessionId</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><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><DT><B>Overrides:</B><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></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - Session object to create in the EIS and then cache.
<DT><B>Returns:</B><DD>the EIS id (e.g. primary key) of the created <code>Session</code> object.</DL>
</DD>
</DL>
<HR>
<A NAME="getCachedSession(java.io.Serializable)"><!-- --></A><H3>
getCachedSession</H3>
<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"><B>getCachedSession</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId)</PRE>
<DL>
<DD>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).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionId</CODE> - the id of the cached session to acquire.
<DT><B>Returns:</B><DD>the cached session with the corresponding <code>sessionId</code>, or <code>null</code> if the session
does not exist or is not cached.</DL>
</DD>
</DL>
<HR>
<A NAME="getCachedSession(java.io.Serializable, org.apache.shiro.cache.Cache)"><!-- --></A><H3>
getCachedSession</H3>
<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"><B>getCachedSession</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId,
<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;&nbsp;cache)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionId</CODE> - the id of the session to acquire.<DD><CODE>cache</CODE> - the cache to acquire the session from
<DT><B>Returns:</B><DD>the cached session, or <code>null</code> if the session wasn't in the cache.</DL>
</DD>
</DL>
<HR>
<A NAME="cache(org.apache.shiro.session.Session, java.io.Serializable)"><!-- --></A><H3>
cache</H3>
<PRE>
protected void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.227"><B>cache</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session,
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId)</PRE>
<DL>
<DD>Caches the specified session under the cache entry key of <code>sessionId</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session to cache<DD><CODE>sessionId</CODE> - the session id, to be used as the cache entry key.<DT><B>Since:</B></DT>
<DD>1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="cache(org.apache.shiro.session.Session, java.io.Serializable, org.apache.shiro.cache.Cache)"><!-- --></A><H3>
cache</H3>
<PRE>
protected void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.246"><B>cache</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session,
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId,
<A HREF="../../../../../../org/apache/shiro/cache/Cache.html" title="interface in org.apache.shiro.cache">Cache</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>,<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt;&nbsp;cache)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session to cache<DD><CODE>sessionId</CODE> - the id of the session, expected to be the cache key.<DD><CODE>cache</CODE> - the cache to store the session</DL>
</DD>
</DL>
<HR>
<A NAME="readSession(java.io.Serializable)"><!-- --></A><H3>
readSession</H3>
<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"><B>readSession</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>&nbsp;sessionId)
throws <A HREF="../../../../../../org/apache/shiro/session/UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Specified by:</B><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><DT><B>Overrides:</B><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></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionId</CODE> - the id of the session to retrieve from the EIS.
<DT><B>Returns:</B><DD>the session identified by <code>sessionId</code> in the EIS.
<DT><B>Throws:</B>
<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.</DL>
</DD>
</DL>
<HR>
<A NAME="update(org.apache.shiro.session.Session)"><!-- --></A><H3>
update</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.276"><B>update</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)
throws <A HREF="../../../../../../org/apache/shiro/session/UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Specified by:</B><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></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session object to update in the EIS.
<DT><B>Throws:</B>
<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></DL>
</DD>
</DL>
<HR>
<A NAME="doUpdate(org.apache.shiro.session.Session)"><!-- --></A><H3>
doUpdate</H3>
<PRE>
protected abstract void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.294"><B>doUpdate</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</PRE>
<DL>
<DD>Subclass implementation hook to actually persist the <code>Session</code>'s state to the underlying EIS.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session object whose state will be propagated to the EIS.</DL>
</DD>
</DL>
<HR>
<A NAME="delete(org.apache.shiro.session.Session)"><!-- --></A><H3>
delete</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.302"><B>delete</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</PRE>
<DL>
<DD>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>.
<P>
<DD><DL>
<DT><B>Specified by:</B><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></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session to remove from caches and permanently delete from the EIS.</DL>
</DD>
</DL>
<HR>
<A NAME="doDelete(org.apache.shiro.session.Session)"><!-- --></A><H3>
doDelete</H3>
<PRE>
protected abstract void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.312"><B>doDelete</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</PRE>
<DL>
<DD>Subclass implementation hook to permanently delete the given Session from the underlying EIS.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session instance to permanently delete from the EIS.</DL>
</DD>
</DL>
<HR>
<A NAME="uncache(org.apache.shiro.session.Session)"><!-- --></A><H3>
uncache</H3>
<PRE>
protected void <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.319"><B>uncache</B></A>(<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&nbsp;session)</PRE>
<DL>
<DD>Removes the specified Session from the cache.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>session</CODE> - the session to remove from the cache.</DL>
</DD>
</DL>
<HR>
<A NAME="getActiveSessions()"><!-- --></A><H3>
getActiveSessions</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session">Session</A>&gt; <A HREF="../../../../../../src-html/org/apache/shiro/session/mgt/eis/CachingSessionDAO.html#line.342"><B>getActiveSessions</B></A>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Specified by:</B><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></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the sessions found in the activeSessions cache.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CachingSessionDAO.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/shiro/session/mgt/eis/AbstractSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/shiro/session/mgt/eis/EnterpriseCacheSessionDAO.html" title="class in org.apache.shiro.session.mgt.eis"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/shiro/session/mgt/eis/CachingSessionDAO.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CachingSessionDAO.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2004-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>