changed: added Cur structure

we have there two pointers: 
 Request * request;
 Session * session;
these are the current request and the current session


the session GC was moved to SessionManager (was in SessionContainer)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-01-23 14:15:30 +00:00
parent 61ac29b2de
commit 915cabdf97
171 changed files with 2822 additions and 2650 deletions

View File

@@ -7,22 +7,20 @@
*
*/
#ifndef headerfilecmslucoresessioncontainer
#define headerfilecmslucoresessioncontainer
#ifndef headerfile_winix_core_sessioncontainer
#define headerfile_winix_core_sessioncontainer
#include <list>
#include <map>
#include <ctime>
#include "session.h"
#include "lastcontainer.h"
#include "request.h"
#include "basethread.h"
#include "cur.h"
#include "config.h"
class SessionContainer : public BaseThread
class SessionContainer
{
public:
@@ -33,13 +31,14 @@ public:
typedef std::list<Session> Table;
typedef Table::iterator Iterator;
typedef std::map<long, Iterator> IndexId;
typedef IndexId::iterator IdIterator;
SessionContainer();
void SetRequest(Request * prequest);
void SetCur(Cur * pcur);
void SetConfig(Config * pconfig);
void SetLastContainer(LastContainer * plast_container);
void SetTmpSession(Session * psession);
void Clear();
@@ -50,20 +49,19 @@ public:
bool PushBack(const Session & session);
Iterator FindById(long);
IdIterator IdBegin();
IdIterator IdEnd();
void EraseById(IdIterator i);
private:
LastContainer * last_container;
Table table;
IndexId index_id;
Request * request;
Config * config;
//void DelFromIdIndex(Iterator iter);
virtual void Work();
bool IsSessionOutdated(const Session & s) const;
void DeleteSession(IndexId::iterator i);
Cur * cur;
Config * config;
Session * tmp_session;
// in FreeBSD implementation (GCC) list::size() has linear complexity
// so we use our own table_size with O(1)