|
apt
@VERSION@
|
A single download queue in a pkgAcquire object. {{{. More...
#include <acquire.h>
Classes | |
| struct | QItem |
| A single item placed in this queue. More... | |
Public Member Functions | |
| bool | Enqueue (ItemDesc &Item) |
| Insert the given fetch request into this queue. | |
| bool | Dequeue (Item *Owner) |
| Remove all fetch requests for the given item from this queue. | |
| QItem * | FindItem (std::string URI, pkgAcquire::Worker *Owner) |
| Locate an item in this queue. | |
| bool | ItemStart (QItem *Itm, unsigned long long Size) |
| bool | ItemDone (QItem *Itm) |
| Remove the given item from this queue and set its state to pkgAcquire::Item::StatDone. | |
| bool | Startup () |
| Start the worker process associated with this queue. | |
| bool | Shutdown (bool Final) |
| Shut down the worker process associated with this queue. | |
| bool | Cycle () |
| Send idle items to the worker process. | |
| void | Bump () |
| Check for items that could be enqueued. | |
| Queue (std::string Name, pkgAcquire *Owner) | |
| Create a new Queue. | |
| virtual | ~Queue () |
Protected Attributes | |
| std::string | Name |
| The name of this queue. | |
| QItem * | Items |
| The head of the list of items contained in this queue. | |
| pkgAcquire::Worker * | Workers |
| The head of the list of workers associated with this queue. | |
| pkgAcquire * | Owner |
| the download scheduler with which this queue is associated. | |
| signed long | PipeDepth |
| The number of entries in this queue that are currently being downloaded. | |
| unsigned long | MaxPipeDepth |
| The maximum number of entries that this queue will attempt to download at once. | |
Friends | |
| class | pkgAcquire |
| class | pkgAcquire::UriIterator |
| class | pkgAcquire::Worker |
A single download queue in a pkgAcquire object. {{{.
| Queue | ( | std::string | Name, |
| pkgAcquire * | Owner | ||
| ) |
Create a new Queue.
| Name | The name of the new queue. |
| Owner | The download process that owns the new queue. |
References Items, MaxPipeDepth, PipeDepth, and Workers.
| ~Queue | ( | ) | [virtual] |
Shut down all the worker processes associated with this queue and empty the queue.
References pkgAcquire::Items, and pkgAcquire::Shutdown().
| void Bump | ( | ) |
Check for items that could be enqueued.
Call this after an item placed in multiple queues has gone from the pkgAcquire::Item::StatFetching state to the pkgAcquire::Item::StatIdle state, to possibly refill an empty queue. This is an alias for Cycle().
| bool Cycle | ( | ) |
Send idle items to the worker process.
Fills up the pipeline by inserting idle items into the worker's queue.
References pkgAcquire::Items, pkgAcquire::Queue::QItem::Next, pkgAcquire::ItemDesc::Owner, pkgAcquire::Worker::QueueItem(), pkgAcquire::Item::StatFetching, pkgAcquire::Item::StatIdle, pkgAcquire::Queue::QItem::Worker, and pkgAcquire::Workers.
Remove all fetch requests for the given item from this queue.
References pkgAcquire::Items, pkgAcquire::Queue::QItem::Next, pkgAcquire::Item::QueueCounter, and pkgAcquire::Item::StatFetching.
Referenced by pkgAcquire::Dequeue().
Insert the given fetch request into this queue.
References pkgAcquire::Items, pkgAcquire::Queue::QItem::Next, pkgAcquire::ItemDesc::Owner, pkgAcquire::Item::QueueCounter, pkgAcquire::Item::StatDone, and pkgAcquire::ItemDesc::URI.
Referenced by pkgAcquire::Enqueue().
| pkgAcquire::Queue::QItem * FindItem | ( | std::string | URI, |
| pkgAcquire::Worker * | Owner | ||
| ) |
Locate an item in this queue.
| URI | A URI to match against. |
| Owner | A pkgAcquire::Worker to match against. |
References pkgAcquire::Items.
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.
| Itm | The item to remove. |
References pkgAcquire::Dequeue(), pkgAcquire::ItemDesc::Owner, pkgAcquire::Item::QueueCounter, pkgAcquire::Item::StatDone, and pkgAcquire::Item::StatFetching.
Presumably this should start downloading an item?
| bool Shutdown | ( | bool | Final | ) |
Shut down the worker process associated with this queue.
| 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. |
References pkgAcquire::Worker::GetConf(), pkgAcquire::MethodConfig::NeedsCleanup, pkgAcquire::Worker::NextQueue, and pkgAcquire::Workers.
| bool 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().
References pkgAcquire::MethodConfig::Pipeline, pkgAcquire::Worker::Start(), and pkgAcquire::Workers.
Referenced by pkgAcquire::Enqueue().
The head of the list of items contained in this queue.
Referenced by Queue(), and pkgAcquire::UriIterator::UriIterator().
pkgAcquire::Worker* Workers [protected] |
1.7.6.1