类 PersistenceSessionRepository
java.lang.Object
cn.taketoday.session.PersistenceSessionRepository
- 所有已实现的接口:
cn.taketoday.beans.factory.DisposableBean,SessionRepository
public class PersistenceSessionRepository
extends Object
implements SessionRepository, cn.taketoday.beans.factory.DisposableBean
SessionRepository implementation for session persistence
- 从以下版本开始:
- 4.0 2023/2/27 21:35
- 作者:
- Harry Yang
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final SessionRepositoryprivate static final cn.taketoday.logging.Loggerprivate final SessionPersister -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanfor WebSession destroy eventstatic WebSessionListenercreateDestructionCallback(SessionPersister sessionPersister) for WebSession destroy eventCreate a new WebSession.createSession(String id) Create a new WebSession with given session id.voiddestroy()Application shutdownString[]intprivate static voidremovePersister(String sessionId, SessionPersister sessionPersister) voidremoveSession(WebSession session) Remove the WebSession for the specified instance.removeSession(String sessionId) Remove the WebSession for the specified id.retrieveSession(String sessionId) Return the WebSession for the given id.voidupdateLastAccessTime(WebSession webSession) Update the last accessed timestamp to "now".
-
字段详细资料
-
log
private static final cn.taketoday.logging.Logger log -
delegate
-
sessionPersister
-
-
构造器详细资料
-
PersistenceSessionRepository
-
-
方法详细资料
-
createSession
从接口复制的说明:SessionRepositoryCreate a new WebSession.Note that this does nothing more than create a new instance. The session can later be started explicitly via
WebSession.start()or implicitly by adding attributes -- and then persisted viaWebSession.save().- 指定者:
createSession在接口中SessionRepository- 返回:
- the created session instance
-
createSession
从接口复制的说明:SessionRepositoryCreate a new WebSession with given session id.Note that this does nothing more than create a new instance. The session can later be started explicitly via
WebSession.start()or implicitly by adding attributes -- and then persisted viaWebSession.save().- 指定者:
createSession在接口中SessionRepository- 返回:
- the created session instance
-
retrieveSession
从接口复制的说明:SessionRepositoryReturn the WebSession for the given id.Note: This method should perform an expiration check, and if it has expired remove the session and return empty. This method should also update the lastAccessTime of retrieved sessions.
- 指定者:
retrieveSession在接口中SessionRepository- 参数:
sessionId- the session to load- 返回:
- the session
-
removeSession
从接口复制的说明:SessionRepositoryRemove the WebSession for the specified instance.- 指定者:
removeSession在接口中SessionRepository- 参数:
session- the instance of the session to remove
-
removeSession
从接口复制的说明:SessionRepositoryRemove the WebSession for the specified id.- 指定者:
removeSession在接口中SessionRepository- 参数:
sessionId- the id of the session to remove- 返回:
- an old session
-
updateLastAccessTime
从接口复制的说明:SessionRepositoryUpdate the last accessed timestamp to "now".- 指定者:
updateLastAccessTime在接口中SessionRepository- 参数:
webSession- the session to update
-
contains
- 指定者:
contains在接口中SessionRepository
-
getSessionCount
public int getSessionCount()- 指定者:
getSessionCount在接口中SessionRepository- 返回:
- the count of sessions
-
getIdentifiers
- 指定者:
getIdentifiers在接口中SessionRepository- 返回:
- all session ids
-
destroy
public void destroy()Application shutdown- 指定者:
destroy在接口中cn.taketoday.beans.factory.DisposableBean
-
removePersister
-
createDestructionCallback
for WebSession destroy event -
createDestructionCallback
for WebSession destroy event
-