接口 SessionRepository
public interface SessionRepository
WebSession Storage- 从以下版本开始:
- 2019-09-28 10:26
- 作者:
- Harry Yang
-
方法概要
修饰符和类型方法说明booleanCreate a new WebSession.createSession(String id) Create a new WebSession with given session id.String[]intdefault 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".
-
方法详细资料
-
createSession
WebSession createSession()Create 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().- 返回:
- the created session instance
- 从以下版本开始:
- 4.0
-
createSession
Create 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().- 返回:
- the created session instance
- 从以下版本开始:
- 4.0
-
retrieveSession
Return 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.
- 参数:
sessionId- the session to load- 返回:
- the session
-
removeSession
Remove the WebSession for the specified instance.- 参数:
session- the instance of the session to remove
-
removeSession
Remove the WebSession for the specified id.- 参数:
sessionId- the id of the session to remove- 返回:
- an old session
-
updateLastAccessTime
Update the last accessed timestamp to "now".- 参数:
webSession- the session to update- 从以下版本开始:
- 4.0
-
contains
-
getSessionCount
int getSessionCount()- 返回:
- the count of sessions
- 从以下版本开始:
- 4.0
-
getIdentifiers
String[] getIdentifiers()- 返回:
- all session ids
- 从以下版本开始:
- 4.0
-