zypp::target::CommitPackageCacheReadAhead Class Reference

#include <CommitPackageCacheReadAhead.h>

Inheritance diagram for zypp::target::CommitPackageCacheReadAhead:
[legend]

List of all members.

Public Member Functions

 CommitPackageCacheReadAhead (const_iterator begin_r, const_iterator end_r, const Pathname &rootDir_r, const PackageProvider &packageProvider_r)
virtual ManagedFile get (const_iterator citem_r)
 Provide the package.

Private Types

typedef std::map
< PoolItem,
ManagedFile
CacheMap

Private Member Functions

bool onInteractiveMedia (const PoolItem &pi) const
 Return whether pi is located on a CD/DVD.
void cacheLastInteractive (const_iterator citem_r)
 Fill the cache.
void doCacheLastInteractive (const_iterator citem_r)
 cacheLastInteractive helper .

Private Attributes

DefaultIntegral
< unsigned, 0 > 
_dbgChanges
const_iterator _commitListEnd
IMediaKey _lastInteractive
Pathname _rootDir
shared_ptr
< filesystem::TmpDir
_cacheDir
CacheMap _cacheMap


Detailed Description

Definition at line 78 of file CommitPackageCacheReadAhead.h.


Member Typedef Documentation

typedef std::map<PoolItem,ManagedFile> zypp::target::CommitPackageCacheReadAhead::CacheMap [private]

Definition at line 80 of file CommitPackageCacheReadAhead.h.


Constructor & Destructor Documentation

zypp::target::CommitPackageCacheReadAhead::CommitPackageCacheReadAhead ( const_iterator  begin_r,
const_iterator  end_r,
const Pathname &  rootDir_r,
const PackageProvider packageProvider_r 
)

Definition at line 51 of file CommitPackageCacheReadAhead.cc.


Member Function Documentation

ManagedFile zypp::target::CommitPackageCacheReadAhead::get ( const_iterator  citem_r  )  [virtual]

Provide the package.

Either from Source or from cache.

Definition at line 192 of file CommitPackageCacheReadAhead.cc.

References _cacheMap, _dbgChanges, _lastInteractive, cacheLastInteractive(), DBG, MIL, onInteractiveMedia(), zypp::target::CommitPackageCache::Impl::sourceProvidePackage(), zypp::AutoDispose< _Tp >::value(), and WAR.

bool zypp::target::CommitPackageCacheReadAhead::onInteractiveMedia ( const PoolItem pi  )  const [private]

Return whether pi is located on a CD/DVD.

Definition at line 65 of file CommitPackageCacheReadAhead.cc.

Referenced by get().

void zypp::target::CommitPackageCacheReadAhead::cacheLastInteractive ( const_iterator  citem_r  )  [private]

Fill the cache.

Called before changing from one interactive media to another. Performs the read ahead of packages trying to avoid the necessity of switching back to the current media later.

Definition at line 80 of file CommitPackageCacheReadAhead.cc.

References _lastInteractive, doCacheLastInteractive(), WAR, and ZYPP_CAUGHT.

Referenced by get().

void zypp::target::CommitPackageCacheReadAhead::doCacheLastInteractive ( const_iterator  citem_r  )  [private]

cacheLastInteractive helper .

Definition at line 99 of file CommitPackageCacheReadAhead.cc.

References _cacheDir, _cacheMap, _commitListEnd, _lastInteractive, _rootDir, zypp::filesystem::copy(), zypp::filesystem::df(), ERR, zypp::str::form(), MIL, zypp::target::CommitPackageCache::Impl::sourceProvidePackage(), zypp::filesystem::unlink(), zypp::AutoDispose< _Tp >::value(), WAR, and ZYPP_THROW.

Referenced by cacheLastInteractive().


Member Data Documentation

DefaultIntegral<unsigned,0> zypp::target::CommitPackageCacheReadAhead::_dbgChanges [private]

Definition at line 108 of file CommitPackageCacheReadAhead.h.

Referenced by get().

const_iterator zypp::target::CommitPackageCacheReadAhead::_commitListEnd [private]

Definition at line 110 of file CommitPackageCacheReadAhead.h.

Referenced by doCacheLastInteractive().

IMediaKey zypp::target::CommitPackageCacheReadAhead::_lastInteractive [private]

Definition at line 111 of file CommitPackageCacheReadAhead.h.

Referenced by cacheLastInteractive(), doCacheLastInteractive(), and get().

Pathname zypp::target::CommitPackageCacheReadAhead::_rootDir [private]

Definition at line 113 of file CommitPackageCacheReadAhead.h.

Referenced by doCacheLastInteractive().

shared_ptr<filesystem::TmpDir> zypp::target::CommitPackageCacheReadAhead::_cacheDir [private]

Definition at line 114 of file CommitPackageCacheReadAhead.h.

Referenced by doCacheLastInteractive().

CacheMap zypp::target::CommitPackageCacheReadAhead::_cacheMap [private]

Definition at line 115 of file CommitPackageCacheReadAhead.h.

Referenced by doCacheLastInteractive(), and get().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:28 2007 for libzypp by  doxygen 1.5.3