MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/3/root/proc/self/root/usr/lib/python2.4/site-packages/yum/failover.pyc
mò
üüPc@sLdkZdfd„ƒYZdefd„ƒYZdefd„ƒYZdS(NtbaseFailOverMethodcBsDtZd„Zdd„Zd„Zdd„Zd„Zd„ZRS(NcCs||_d|_dS(Ni(trepotselftfailures(RR((t0/usr/lib/python2.4/site-packages/yum/failover.pyt__init__s	cCsdS(sÖReturns a serverurl based on this failover method or None 
           if complete failure.  If i is given it is a direct index
           to pull a server URL from instead of using the failures 
           counter.N(tNone(Rti((Rt
get_serverurlscCs|id|_dS(s<Tells the failover method that the current server is failed.iN(RR(R((Rt
server_failed%sicCs
||_dS(s,Reset the failures counter to a given index.N(RRR(RR((Rtreset)scCs|iS(s	Returns the current number of failures which is also the
           index into the list this object represents.  ger_serverurl()
           should always be used to translate an index into a URL
           as this object may change how indexs map.  (See RoundRobin)N(RR(R((Rt	get_index-scCst|iiƒS(s5Returns the how many URLs we've got to cycle through.N(tlenRRturls(R((RR5s(	t__name__t
__module__RRRR	R
RR(((RRs			tprioritycBstZdZed„ZRS(s6Chooses server based on the first success in the list.cCsO|djo
|i}n|}|t|iiƒjodSn|ii|S(sNReturns a serverurl based on this failover method or None if complete failure.N(RRRRtindexRRR
(RRR((RR@s

(RRt__doc__RR(((RR<st
roundRobincBs#tZdZd„Zed„ZRS(s&Chooses server based on a round robin.cCs3ti||ƒtiƒtiddƒ|_dS(Nii%(RRRRtrandomtseedtrandinttoffset(RR((RRSs
cCsl|djo
|i}n|}|t|iiƒjodSn||it|iiƒ}|ii|S(sNReturns a serverurl based on this failover method or None if complete failure.N(
RRRRRRRR
Rtrr(RRRR((RRXs

(RRRRRR(((RROs	(RRRR(RRRR((Rt?s	$