TreeFrogFramework  1.29
Public Member Functions | Static Public Member Functions | List of all members
TSessionStore Class Referenceabstract

#include <tsessionstore.h>

Inheritance diagram for TSessionStore:
Inheritance graph
[legend]

Public Member Functions

 TSessionStore ()
 
virtual ~TSessionStore ()
 
virtual TSession find (const QByteArray &id)=0
 
virtual bool store (TSession &sesion)=0
 
virtual bool remove (const QByteArray &id)=0
 
virtual int gc (const QDateTime &expire)=0
 

Static Public Member Functions

static qint64 lifeTimeSecs ()
 

Detailed Description

The TSessionStore is an abstract class that stores HTTP sessions.

Constructor & Destructor Documentation

◆ TSessionStore()

TSessionStore::TSessionStore ( )
inline

◆ ~TSessionStore()

virtual TSessionStore::~TSessionStore ( )
inlinevirtual

Member Function Documentation

◆ find()

TSession TSessionStore::find ( const QByteArray &  id)
pure virtual

Returns the session which has the ID id and is newer than or equal to the expiration datetime in the session store. If the store contains no such session, the function returns a empty session. This function should be called from any reimplementations of find().

Implemented in TSessionMongoStore, TSessionRedisStore, and TSessionSqlObjectStore.

◆ gc()

virtual int TSessionStore::gc ( const QDateTime &  expire)
pure virtual

◆ lifeTimeSecs()

qint64 TSessionStore::lifeTimeSecs ( )
static

◆ remove()

bool TSessionStore::remove ( const QByteArray &  id)
pure virtual

Removes all sessions older than the expiration datetime. This function should be called from any reimplementations of remove().

Removes the session with the ID id. This function should be called from any reimplementations of remove().

Implemented in TSessionMongoStore, TSessionRedisStore, and TSessionSqlObjectStore.

◆ store()

bool TSessionStore::store ( TSession sesion)
pure virtual

Stores the session in the session store. This function should be called from any reimplementations of store().

Implemented in TSessionMongoStore, TSessionRedisStore, and TSessionSqlObjectStore.


The documentation for this class was generated from the following files: