A single download queue in a pkgAcquire object.
More...
#include <acquire.h>
A single download queue in a pkgAcquire object.
{{{
- Todo:
- Why so many protected values?
pkgAcquire::Queue::Queue |
( |
std::string |
Name, |
|
|
pkgAcquire * |
Owner |
|
) |
| |
Create a new Queue.
- Parameters
-
Name | The name of the new queue. |
Owner | The download process that owns the new queue. |
virtual pkgAcquire::Queue::~Queue |
( |
| ) |
|
|
virtual |
Shut down all the worker processes associated with this queue and empty the queue.
void pkgAcquire::Queue::Bump |
( |
| ) |
|
bool pkgAcquire::Queue::Cycle |
( |
| ) |
|
Send idle items to the worker process.
Fills up the pipeline by inserting idle items into the worker's queue.
bool pkgAcquire::Queue::Dequeue |
( |
Item * |
Owner | ) |
|
Remove all fetch requests for the given item from this queue.
- Returns
- true if at least one request was removed from the queue.
bool pkgAcquire::Queue::Enqueue |
( |
ItemDesc & |
Item | ) |
|
Insert the given fetch request into this queue.
- Returns
- true if the queuing was successful. May return false if the Item is already in the queue
Locate an item in this queue.
- Parameters
-
- Returns
- the first item in the queue whose URI is URI and that is being downloaded by Owner.
bool pkgAcquire::Queue::ItemDone |
( |
QItem * |
Itm | ) |
|
Remove the given item from this queue and set its state to pkgAcquire::Item::StatDone.
If this is the only queue containing the item, the item is also removed from the main queue by calling pkgAcquire::Dequeue.
- Parameters
-
- Returns
- true if no errors are encountered.
bool pkgAcquire::Queue::ItemStart |
( |
QItem * |
Itm, |
|
|
unsigned long long |
Size |
|
) |
| |
Presumably this should start downloading an item?
- Todo:
- Unimplemented. Implement it or remove?
bool pkgAcquire::Queue::Shutdown |
( |
bool |
Final | ) |
|
Shut down the worker process associated with this queue.
- Parameters
-
Final | If true, then the process is stopped unconditionally. Otherwise, it is only stopped if it does not need cleanup as indicated by the pkgAcqMethod::NeedsCleanup member of its configuration. |
- Returns
- true.
bool pkgAcquire::Queue::Startup |
( |
| ) |
|
Start the worker process associated with this queue.
If a worker process is already associated with this queue, this is equivalent to calling Cycle().
- Returns
- true if the startup was successful.
void* pkgAcquire::Queue::d |
|
private |
dpointer placeholder (for later in case we need it)
QItem* pkgAcquire::Queue::Items |
|
protected |
unsigned long pkgAcquire::Queue::MaxPipeDepth |
|
protected |
The maximum number of entries that this queue will attempt to download at once.
std::string pkgAcquire::Queue::Name |
|
protected |
Queue* pkgAcquire::Queue::Next |
|
private |
the download scheduler with which this queue is associated.
signed long pkgAcquire::Queue::PipeDepth |
|
protected |
The number of entries in this queue that are currently being downloaded.
The head of the list of workers associated with this queue.
- Todo:
- This is plural because support exists in Queue for multiple workers. However, it does not appear that there is any way to actually associate more than one worker with a queue.
- Todo:
- Why not just use a std::set?
The documentation for this class was generated from the following file: