Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ConnectionsScheduler Class Reference

List of all members.

Public Member Functions

void addReadyConnection (ConnectionPtr, int=1)
void addWaitingConnection (ConnectionPtr, int=1)
 ConnectionsScheduler ()
ConnectionPtr getConnection ()
void getConnections (list< ConnectionPtr > &out)
int getConnectionsNumber ()
void initialize ()
void listener (struct ListenerArg *)
void lockConnectionsList ()
void release ()
void removeConnection (ConnectionPtr connection)
void removeListener (struct ListenerArg *)
void restart ()
void terminateConnections ()
void unlockConnectionsList ()
 ~ConnectionsScheduler ()

Private Attributes

HashMap< SocketHandle, ConnectionPtrconnections
Mutex connectionsMutex
u_long currentPriority
u_long currentPriorityDone
ThreadID dispatchedThreadId
DispatcherArg dispatcherArg
Mutex eventsMutex
list< ListenerArg * > listeners
queue< ConnectionPtr > * ready
Mutex readyMutex
SemaphorereadySemaphore
event timeoutEv

Constructor & Destructor Documentation

ConnectionsScheduler::ConnectionsScheduler  ) 
 

C'tor.

ConnectionsScheduler::~ConnectionsScheduler  ) 
 

D'tor.


Member Function Documentation

void ConnectionsScheduler::addReadyConnection ConnectionPtr  c,
int  doLock = 1
 

Add a connection to ready connections queue.

void ConnectionsScheduler::addWaitingConnection ConnectionPtr  c,
int  doLock = 1
 

Add a connection to waiting connections queue.

ConnectionPtr ConnectionsScheduler::getConnection  ) 
 

Get a connection from the active connections queue.

void ConnectionsScheduler::getConnections list< ConnectionPtr > &  out  ) 
 

Fullfill a list with all the connections.

Parameters:
out A list that will receive all the connections alive on the server.

int ConnectionsScheduler::getConnectionsNumber  ) 
 

Get the alive connections number.

void ConnectionsScheduler::initialize  ) 
 

Static initialization.

void ConnectionsScheduler::listener struct ListenerArg  ) 
 

void ConnectionsScheduler::lockConnectionsList  ) 
 

Acquire the access to the connection mutex.

void ConnectionsScheduler::release  ) 
 

Release all the blocking calls.

void ConnectionsScheduler::removeConnection ConnectionPtr  connection  ) 
 

Remove a connection from the connections set.

void ConnectionsScheduler::removeListener struct ListenerArg  ) 
 

void ConnectionsScheduler::restart  ) 
 

Restart the scheduler.

void ConnectionsScheduler::terminateConnections  ) 
 

Terminate any active connection.

void ConnectionsScheduler::unlockConnectionsList  ) 
 

Release the connection access.


Member Data Documentation

HashMap<SocketHandle, ConnectionPtr> ConnectionsScheduler::connections [private]
 

Mutex ConnectionsScheduler::connectionsMutex [private]
 

u_long ConnectionsScheduler::currentPriority [private]
 

u_long ConnectionsScheduler::currentPriorityDone [private]
 

ThreadID ConnectionsScheduler::dispatchedThreadId [private]
 

DispatcherArg ConnectionsScheduler::dispatcherArg [private]
 

Mutex ConnectionsScheduler::eventsMutex [private]
 

list<ListenerArg*> ConnectionsScheduler::listeners [private]
 

queue<ConnectionPtr>* ConnectionsScheduler::ready [private]
 

Mutex ConnectionsScheduler::readyMutex [private]
 

Semaphore* ConnectionsScheduler::readySemaphore [private]
 

event ConnectionsScheduler::timeoutEv [private]
 


Generated on Thu May 1 12:41:00 2008 for MyServer by  doxygen 1.3.9.1