virtual const char* getID() const=0;
/**
+ * Returns the session's application ID.
+ *
+ * @return unique ID of application bound to session
+ */
+ virtual const char* getApplicationID() const=0;
+
+ /**
+ * Returns the session expiration.
+ *
+ * @return the session's expiration time or 0 for none
+ */
+ virtual time_t getExpiration() const=0;
+
+ /**
+ * Returns the last access time of the session.
+ *
+ * @return the session's last access time
+ */
+ virtual time_t getLastAccess() const=0;
+
+ /**
* Returns the address of the client associated with the session.
*
* @return the client's network address
{
MAKE_NONCOPYABLE(SessionCache);
protected:
-
- /**
- * Constructor
- *
- * <p>The following XML content is supported to configure the cache:
- * <dl>
- * <dt>cacheTimeout</dt>
- * <dd>attribute containing maximum lifetime in seconds for unused sessions to remain in cache</dd>
- * </dl>
- *
- * @param e root of DOM tree to configure the cache
- */
- SessionCache(const xercesc::DOMElement* e);
-
- /** maximum lifetime in seconds for unused sessions to be cached */
- unsigned long m_cacheTimeout;
-
+ SessionCache() {}
public:
virtual ~SessionCache() {}
const std::set<std::string>* indexes,
const Application& application
)=0;
+
+ /**
+ * Executes a test of the cache's general health.
+ */
+ virtual void test()=0;
#endif
/**
virtual void remove(const char* key, const Application& application)=0;
};
-#ifndef SHIBSP_LITE
/** SessionCache implementation backed by a StorageService. */
#define STORAGESERVICE_SESSION_CACHE "StorageService"
-#endif
-
- /** SessionCache implementation for lite builds that delegates to a remoted version. */
- #define REMOTED_SESSION_CACHE "Remoted"
/**
* Registers SessionCache classes into the runtime.