NuriaProject Framework
0.1
The NuriaProject Framework
|
Provides an AbstractSessionManager with memory-based storage. More...
#include <sessionmanager.hpp>
Public Slots | |
virtual void | removeSession (const QByteArray &id) override |
![]() | |
virtual void | removeSession (const QByteArray &id)=0 |
Public Member Functions | |
SessionManager (int maxSessions=1000, QObject *parent=0) | |
bool | exists (const QByteArray &id) const override |
Session | get (const QByteArray &id) override |
int | maxSessions () |
void | setMaxSessions (int maxSessions) |
![]() | |
AbstractSessionManager (QObject *parent=nullptr) | |
virtual Session | create () |
Additional Inherited Members | |
![]() | |
Session | createSession (const QByteArray &id) |
virtual QByteArray | generateNewId () |
Provides an AbstractSessionManager with memory-based storage.
SessionManager is a memory-storage reference implementation of the AbstractSessionManager interface. Note that SessionManager limits the number of sessions at a given time, any additional session will lead to the deletion of the least recently used session. The default limit is set at 1000
sessions.
|
explicit |
Creates a SessionManager for storing maxSessions sessions at once.
|
overridevirtual |
Returns true
if the session id is known by the manager.
Implements Nuria::AbstractSessionManager.
|
overridevirtual |
Fetches the session id. If no session id is known, a new one with that id will be created instead.
Implements Nuria::AbstractSessionManager.
int Nuria::SessionManager::maxSessions | ( | ) |
Returns the maximum number of sessions.
void Nuria::SessionManager::setMaxSessions | ( | int | maxSessions | ) |
Sets the maximum number of sessions to maxSessions.