#include <Queue.h>
Inheritance diagram for Queue:
Public Methods | |
virtual | ~Queue () throw () |
Destroy a Queue. | |
virtual void | add (T item)=0 |
virtual bool | add (T item, unsigned long timeout)=0 |
virtual T | next ()=0 |
virtual T | next (unsigned long timeout)=0 |
virtual void | cancel ()=0 |
virtual size_t | size ()=0 |
virtual size_t | size (unsigned long timeout)=0 |
virtual bool | empty () |
virtual bool | empty (unsigned long timeout) |
A Queue coordinates the gathering and distribution of items for any set of threads.
|
Add an object to this Queue, tranfering the ownership of that object to the Queue. As the new owner, the Queue becomes responsible for deleting the add()ed object. This method may or may not block the caller for a definite amount of time. Those details are defined by specializations of this class; however, this method includes a timeout value that can be used to limit the maximum amount of time that a specialization could block.
Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |
|
Add an object to this Queue, tranfering the ownership of that object to the Queue. As the new owner, the Queue becomes responsible for deleting the add()ed object. This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |
|
Canceling a Queue disables it, disallowing further add()itions. Items already present in the Queue can still be retrieved and are still available through the next() methods. cancel()ing a Queue more than once has no effect.
Implements Cancelable. Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |
|
Test this Queue to see if it is empty by testing the size of the Queue.
Reimplemented in BoundedQueue, and MonitoredQueue. |
|
Test this Queue to see if it is empty by testing the size of the Queue.
Reimplemented in BoundedQueue, and MonitoredQueue. |
|
Get an object from this Queue, transfering the ownership of that object to the caller. As the new owner, the caller becomes responsible for deleting the object. This method may or may not block the caller for a definite amount of time. Those details are defined by specializations of this class; however, this method includes a timeout value that can be used to limit the maximum amount of time that a specialization could block.
Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |
|
Get an object from this Queue, transfering the ownership of that object to the caller. As the new owner, the caller becomes responsible for deleting the object. This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |
|
Count the items present in this Queue. This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class. This method may or may not block the caller for a definite amount of time. Those details are defined by specializations of this class; however, this method includes a timeout value that can be used to limit the maximum amount of time that a specialization could block.
Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |
|
Count the items present in this Queue. This method may or may not block the caller for an indefinite amount of time. Those details are defined by specializations of this class.
Implemented in BlockingQueue, BoundedQueue, LockedQueue, and MonitoredQueue. |