Class Sessions.Memory
java.lang.Object
com.codename1.backend.Sessions.Memory
- All Implemented Interfaces:
SessionStore
- Enclosing class:
Sessions
Sessions in this process's memory. The default.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidForgets a session.The session with this id, or null when there is none or it expired.intpurgeExpired(long now) Drops every session that has expired bynow; answers how many.voidsave(HttpSession session, String previousId) Records a session after a request that created or changed it.intsize()How many sessions are kept, or -1 when that is expensive to know.
-
Constructor Details
-
Memory
public Memory()
-
-
Method Details
-
load
Description copied from interface:SessionStoreThe session with this id, or null when there is none or it expired.- Specified by:
loadin interfaceSessionStore
-
save
Description copied from interface:SessionStoreRecords a session after a request that created or changed it. When its id changed,previousIdnames the entry to drop; otherwise it is null.- Specified by:
savein interfaceSessionStore
-
delete
Description copied from interface:SessionStoreForgets a session.- Specified by:
deletein interfaceSessionStore
-
purgeExpired
public int purgeExpired(long now) Description copied from interface:SessionStoreDrops every session that has expired bynow; answers how many.- Specified by:
purgeExpiredin interfaceSessionStore
-
size
public int size()Description copied from interface:SessionStoreHow many sessions are kept, or -1 when that is expensive to know.- Specified by:
sizein interfaceSessionStore
-