Package com.smeup.kokos.sdk.dao
Class SessionDAO
java.lang.Object
com.smeup.kokos.sdk.dao.SessionDAO
- Author:
- mattia.bonardi The interface to access to the session. The SessionDAO uses redis as primary datasource, else use inMemorySession user session: { [session_id]_[context]: Object }
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the session.Read session data given the contextvoidSave session data.voidsaveVariables(Map<String, String> variables, int ttlInSeconds)
-
Constructor Details
-
SessionDAO
-
-
Method Details
-
save
Save session data.- Parameters:
context- the session context key. (i.e. 'rpgle', define the session relative to rpgle)data- datattlInSeconds- time to live (seconds)
-
saveVariables
-
read
Read session data given the context- Parameters:
context- the session context key- Returns:
- data as String Map
-
readVariables
-
clear
public void clear()Clear the session. Clear all keys that refers to sessionId
-