Squid Web Cache master
Loading...
Searching...
No Matches
Adaptation::ServicePlan Class Reference

#include <ServiceGroups.h>

Collaboration diagram for Adaptation::ServicePlan:
[legend]

Public Types

typedef unsigned int Pos
 

Public Member Functions

 ServicePlan ()
 
 ServicePlan (const ServiceGroupPointer &g, const ServiceFilter &filter)
 true iff there are no more services planned
 
bool exhausted () const
 
ServicePointer current () const
 returns nil if the plan is complete
 
ServicePointer replacement (const ServiceFilter &filter)
 next to try after failure
 
ServicePointer next (const ServiceFilter &filter)
 next in chain after success
 
std::ostream & print (std::ostream &os) const
 

Private Attributes

ServiceGroupPointer group
 the group we are iterating
 
Pos pos
 current service position within the group
 
bool atEof
 cached information for better performance
 

Detailed Description

iterates services stored in a group; iteration is not linear because we need to both replace failed services and advance to the next chain link

Definition at line 122 of file ServiceGroups.h.

Member Typedef Documentation

◆ Pos

Definition at line 125 of file ServiceGroups.h.

Constructor & Destructor Documentation

◆ ServicePlan() [1/2]

Adaptation::ServicePlan::ServicePlan ( )

Definition at line 275 of file ServiceGroups.cc.

◆ ServicePlan() [2/2]

Adaptation::ServicePlan::ServicePlan ( const ServiceGroupPointer g,
const ServiceFilter filter 
)
explicit

Definition at line 279 of file ServiceGroups.cc.

References atEof, group, and pos.

Member Function Documentation

◆ current()

Adaptation::ServicePointer Adaptation::ServicePlan::current ( ) const

current service

Definition at line 289 of file ServiceGroups.cc.

◆ exhausted()

bool Adaptation::ServicePlan::exhausted ( ) const
inline

Definition at line 132 of file ServiceGroups.h.

References atEof.

◆ next()

Adaptation::ServicePointer Adaptation::ServicePlan::next ( const ServiceFilter filter)

Definition at line 304 of file ServiceGroups.cc.

◆ print()

std::ostream & Adaptation::ServicePlan::print ( std::ostream &  os) const

Definition at line 312 of file ServiceGroups.cc.

Referenced by Adaptation::operator<<().

◆ replacement()

Adaptation::ServicePointer Adaptation::ServicePlan::replacement ( const ServiceFilter filter)

Definition at line 296 of file ServiceGroups.cc.

Member Data Documentation

◆ atEof

bool Adaptation::ServicePlan::atEof
private

Definition at line 144 of file ServiceGroups.h.

Referenced by ServicePlan(), and exhausted().

◆ group

ServiceGroupPointer Adaptation::ServicePlan::group
private

Definition at line 142 of file ServiceGroups.h.

Referenced by ServicePlan().

◆ pos

Pos Adaptation::ServicePlan::pos
private

Definition at line 143 of file ServiceGroups.h.

Referenced by ServicePlan().


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