TreeFrogFramework  2.8
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 int64_t 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 TSessionSqlObjectStore, TSessionRedisStore, TSessionMongoStore, and TSessionMemcachedStore.

◆ gc()

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

◆ lifeTimeSecs()

int64_t TSessionStore::lifeTimeSecs ( )
static

◆ remove()

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

Removes all sessions older than the expiration datetime.

Removes the session with the ID id.

This function should be called from any reimplementations of remove().

Implemented in TSessionSqlObjectStore, TSessionRedisStore, TSessionMongoStore, and TSessionMemcachedStore.

◆ 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 TSessionSqlObjectStore, TSessionRedisStore, TSessionMongoStore, and TSessionMemcachedStore.


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