libzypp 17.37.10

zypp::target::CommitPackageCache Class Reference

Target::commit helper optimizing package provision. More...

`#include <zypp/target/CommitPackageCache.h>`

## Classes
class | Impl
| Base for CommitPackageCache implementations (implements no chache). More...

## Public Types
using | PackageProvider = function<ManagedFile (const PoolItem &, bool)>

## Public Member Functions
| CommitPackageCache (PackageProvider packageProvider_r=RepoProvidePackage())
| Ctor.
| CommitPackageCache (const Pathname &, const PackageProvider &packageProvider_r=RepoProvidePackage()) ZYPP_DEPRECATED
| ~CommitPackageCache ()
| Dtor.
void | setCommitList (std::vector< sat::Solvable > commitList_r)
| Download(commit) sequence of solvables to compute read ahead.
template<class TIterator>
void | setCommitList (TIterator begin_r, TIterator end_r)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
ManagedFile | get (const PoolItem &citem_r)
| Provide a package.
ManagedFile | get (sat::Solvable citem_r)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool | preloaded () const
| Whether preloaded hint is set.
void | preloaded (bool newval_r)
| Set preloaded hint.
| CommitPackageCache (Impl *pimpl_r)
| Ctor taking an implementation.

## Private Attributes
RW_pointer< Impl > | _pimpl
| Pointer to implementation.

## Friends
std::ostream & | operator<< (std::ostream &str, const CommitPackageCache &obj)

## Related Symbols
(Note that these are not member symbols.)
std::ostream & | operator<< (std::ostream &str, const CommitPackageCache &obj)
| Stream output.
std::ostream & | operator<< (std::ostream &str, const CommitPackageCache::Impl &obj)
| Stream output.

## Detailed Description

Target::commit helper optimizing package provision.

Definition at line 58 of file CommitPackageCache.h.

## Member Typedef Documentation

## ◆ PackageProvider

using zypp::target::CommitPackageCache::PackageProvider = function<ManagedFile (const PoolItem &, bool)>

Definition at line 63 of file CommitPackageCache.h.

## Constructor & Destructor Documentation

## ◆ CommitPackageCache() [1/3]

zypp::target::CommitPackageCache::CommitPackageCache | ( | PackageProvider | packageProvider_r = RepoProvidePackage() | ) |

Ctor.

Definition at line 121 of file CommitPackageCache.cc.

## ◆ CommitPackageCache() [2/3]

zypp::target::CommitPackageCache::CommitPackageCache | ( | const Pathname & | ,
|  | const PackageProvider & | packageProvider_r = RepoProvidePackage() )

Deprecated
  Legacy Ctor; Pathname rootDir_r is not used. The repositories RepoInfo::packagesPath defines the cache location.

Definition at line 135 of file CommitPackageCache.cc.

## ◆ ~CommitPackageCache()

zypp::target::CommitPackageCache::~CommitPackageCache | ( |  | ) |

Dtor.

Definition at line 140 of file CommitPackageCache.cc.

## ◆ CommitPackageCache() [3/3]

zypp::target::CommitPackageCache::CommitPackageCache | ( | Impl * | pimpl_r | ) |
| explicit

Ctor taking an implementation.

Definition at line 115 of file CommitPackageCache.cc.

## Member Function Documentation

## ◆ setCommitList() [1/2]

void zypp::target::CommitPackageCache::setCommitList | ( | std::vector< sat::Solvable > | commitList_r | ) |

Download(commit) sequence of solvables to compute read ahead.

Definition at line 143 of file CommitPackageCache.cc.

## ◆ setCommitList() [2/2]

template<class TIterator>

void zypp::target::CommitPackageCache::setCommitList | ( | TIterator | begin_r,
|  | TIterator | end_r )
| inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 82 of file CommitPackageCache.h.

## ◆ get() [1/2]

ManagedFile zypp::target::CommitPackageCache::get | ( | const PoolItem & | citem_r | ) |

Provide a package.

Definition at line 146 of file CommitPackageCache.cc.

## ◆ get() [2/2]

ManagedFile zypp::target::CommitPackageCache::get | ( | sat::Solvable | citem_r | ) |
| inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 88 of file CommitPackageCache.h.

## ◆ preloaded() [1/2]

bool zypp::target::CommitPackageCache::preloaded | ( |  | ) | const

Whether preloaded hint is set.

If preloaded the cache tries to avoid trigering the infoInCache CB, based on the assumption this was already done when preloading the cache.

Definition at line 149 of file CommitPackageCache.cc.

## ◆ preloaded() [2/2]

void zypp::target::CommitPackageCache::preloaded | ( | bool | newval_r | ) |

Set preloaded hint.

Definition at line 152 of file CommitPackageCache.cc.

## Friends And Related Symbol Documentation

## ◆ operator<< [1/3]

std::ostream & operator<< | ( | std::ostream & | str,
|  | const CommitPackageCache & | obj )
| friend

Definition at line 160 of file CommitPackageCache.cc.

## ◆ operator<<() [2/3]

std::ostream & operator<< | ( | std::ostream & | str,
|  | const CommitPackageCache & | obj )
| related

Stream output.

Definition at line 160 of file CommitPackageCache.cc.

## Member Data Documentation

## ◆ _pimpl

RW_pointer<Impl> zypp::target::CommitPackageCache::_pimpl
| private

Pointer to implementation.

Definition at line 106 of file CommitPackageCache.h.

The documentation for this class was generated from the following files:

- zypp/target/CommitPackageCache.h
- zypp/target/CommitPackageCache.cc