Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

PRInt32 tmTransactionManager::AddQueue ( const char *  aQueueType  )  [protected]

If all is successful a new queue with the name provided will be created, and added to the collection of queues. It will be initialized and ready to have transactions added.

This doesn't check for the existance of a queue with this name. IF there is already a queue with this name then you will get that when using GetQueue(qName) and never get the new queue created here. A call to GetQueue(qID) will be able to get at the new queue, however you had better cache the ID.

-1 if the queue can't be created, or is not added

>= 0 if the queue was added successfully

Definition at line 140 of file tmTransactionManager.cpp.

References tmVector::Append(), and tmQueue::Init().

Referenced by HandleTransaction().


  tmQueue* queue = new tmQueue();
  if (!queue)
    return -1;
  PRInt32 index = mQueues.Append(queue);
  if (index < 0)
    delete queue;
    queue->Init(aQueueName, index, this);
  return index;

Generated by  Doxygen 1.6.0   Back to index