Package io.micronaut.session
Interface SessionStore<S extends Session>
- Type Parameters:
S- The session
- All Known Implementing Classes:
InMemorySessionStore
public interface SessionStore<S extends Session>
Interface for locating and saving sessions.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptiondeleteSession(String id) Delete a session for the given ID.findSession(String id) Find a session for the given ID.Create a new unsaved session.Save the given session.
-
Method Details
-
newSession
S newSession()Create a new unsaved session.- Returns:
- The created session
-
findSession
Find a session for the given ID.- Parameters:
id- The ID of the session- Returns:
- A future the completes with an
Optionalsession
-
deleteSession
Delete a session for the given ID.- Parameters:
id- The ID of the session- Returns:
- A future that outputs
trueif the session was successfully deleted
-
save
Save the given session.- Parameters:
session- The session to save- Returns:
- A future that completes with the saved session once the operation is complete
-