#include <BoundedQueue.h>
Inheritance diagram for BoundedQueue:
Public Methods | |
BoundedQueue (unsigned int capacity) | |
virtual | ~BoundedQueue () throw () |
Destroy this Queueand any remaining items. | |
unsigned int | capacity () |
virtual void | add (T item) |
virtual void | add (T item, unsigned long timeout) |
virtual T | next () |
virtual T | next (unsigned long timeout) |
virtual void | cancel () |
virtual bool | isCanceled () |
virtual size_t | size () |
virtual size_t | size (unsigned long timeout) |
virtual bool | empty () |
virtual bool | empty (unsigned long timeout) |
|
Create a new Queue with the given capacity. This capacity can not be altered once the Queue is created.
|
|
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 block the caller for an indefinite amount of time if the Queue is at capacity.
Implements Queue. |
|
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 block the caller for an indefinite amount of time if the Queue is at capacity.
Implements Queue. |
|
Cancel this queue. This method will block the calling thread until exclusive access to the Queue can be obtained or until an exception is thrown.
Implements Queue. |
|
Get the capacity of this Queue. When the Queue is at capacity the add() methods will block.
|
|
Test this Queue to see if it is empty. This will block the calling thread until the Queue becomes empty.
Reimplemented from Queue. |
|
Test this Queue to see if it is empty. This will block the calling thread until the Queue becomes empty.
Reimplemented from Queue. |
|
Determine if this Queue has been cancel()ed. This method will block the calling thread until exclusive access to the Queue can be obtained or until an exception is thrown.
Implements Cancelable. |
|
Get an object from this Queue. This method will block the calling thread until an item arrives in the Queue or until an exception is thrown.
Implements Queue. |
|
Get an object from this Queue. This method will block the calling thread until an item arrives in the Queue or until an exception is thrown.
Implements Queue. |
|
Count the items present in this Queue. This method will not block the calling thread.
Implements Queue. |
|
Count the items present in this Queue. This method will not block the calling thread.
Implements Queue. |