QueueTable Class Reference

#include <QueueManager.hpp>

Public Member Functions

 QueueTable ()
 
DataQueuelocate (const char *name)
 
DataQueuesynchronizedLocate (ServerQueueManager *manager, const char *name)
 
DataQueuelocate (SessionID id)
 
DataQueuesynchronizedLocate (ServerQueueManager *manager, SessionID id)
 
DataQueueremove (const char *name)
 
DataQueueremove (SessionID id)
 
void remove (DataQueue *q)
 
void removeQueue (DataQueue *current, DataQueue *previous)
 
bool isEmpty ()
 
void add (DataQueue *queue)
 

Protected Attributes

DataQueuequeues
 

Detailed Description

Definition at line 192 of file QueueManager.hpp.

Constructor & Destructor Documentation

◆ QueueTable()

QueueTable::QueueTable ( )
inline

Definition at line 196 of file QueueManager.hpp.

References queues.

Member Function Documentation

◆ add()

void QueueTable::add ( DataQueue queue)

◆ isEmpty()

bool QueueTable::isEmpty ( )
inline

Definition at line 228 of file QueueManager.hpp.

References queues.

Referenced by ServerQueueManager::isStoppable().

◆ locate() [1/2]

◆ locate() [2/2]

DataQueue * QueueTable::locate ( SessionID  id)

locate a session data queue

Parameters
idThe session ID of the queue.
Returns
The DataQueue for the session, which will be created if needed.

Definition at line 330 of file QueueManager.cpp.

References DataQueue::next, queues, and DataQueue::session.

◆ remove() [1/3]

DataQueue * QueueTable::remove ( const char *  name)

locate and remove a named data queue

Parameters
nameThe queue name.
Returns
The DataQueue matching the name, or NULL if it doesn't exist.

Definition at line 370 of file QueueManager.cpp.

References DataQueue::next, DataQueue::queueName, queues, removeQueue(), and Utilities::strCaselessCompare().

Referenced by ServerQueueManager::deleteNamedQueue(), and ServerQueueManager::deleteSessionQueue().

◆ remove() [2/3]

void QueueTable::remove ( DataQueue q)

locate and remove a specific data queue

Parameters
qThe queue to remove.

Definition at line 396 of file QueueManager.cpp.

References DataQueue::next, queues, and removeQueue().

◆ remove() [3/3]

DataQueue * QueueTable::remove ( SessionID  id)

locate a session data queue

Parameters
idThe session identifier of the queue to remove.
Returns
The removed queue.

Definition at line 421 of file QueueManager.cpp.

References add(), DataQueue::next, queues, removeQueue(), and DataQueue::session.

◆ removeQueue()

void QueueTable::removeQueue ( DataQueue current,
DataQueue previous 
)
inline

Definition at line 215 of file QueueManager.hpp.

References DataQueue::next, and queues.

Referenced by remove().

◆ synchronizedLocate() [1/2]

DataQueue * QueueTable::synchronizedLocate ( ServerQueueManager manager,
const char *  name 
)

locate a named data queue, with session manager locking

Parameters
nameThe target data queue name.
Returns
The DataQueue descriptor, or NULL if it does not exist.

Definition at line 316 of file QueueManager.cpp.

References locate(), and ServerQueueManager::lock.

Referenced by ServerQueueManager::pullFromNamedQueue().

◆ synchronizedLocate() [2/2]

DataQueue * QueueTable::synchronizedLocate ( ServerQueueManager manager,
SessionID  id 
)

locate a session data queue, with session manager locking

Parameters
idThe session ID of the queue.
Returns
The DataQueue for the session, which will be created if needed.

Definition at line 356 of file QueueManager.cpp.

References locate(), and ServerQueueManager::lock.

Member Data Documentation

◆ queues

DataQueue* QueueTable::queues
protected

Definition at line 237 of file QueueManager.hpp.

Referenced by add(), isEmpty(), locate(), QueueTable(), remove(), and removeQueue().


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