xdh
2019-02-21 92eee67f85cbd29feb1287ae5a15ad0c787e95cb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"Û!\c@sIddlmZddd„ƒYZdd    d„ƒYZdad„ZdS(
iÿÿÿÿ(ttimetMergeServerProxyClientcBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(icCs:||_||_||_d|_t|_d|_dS(Ni(t    sessionIDt
clientGUIDtgroupIDt*_MergeServerProxyClient__lastHeartbeatTicktTruetisValidt._MergeServerProxyClient__lastSendHeartbeatTick(tselfRRR((s.\MergeProxyClientMgr.pyt__init__ s                     cCstƒ|_dS(N(RR(R    ((s.\MergeProxyClientMgr.pytrefreshHeartbeatscCs+tƒ}||j|jdkr'tStS(Ni(RRtHeartbeatIntervalRtFalse(R    tnow((s.\MergeProxyClientMgr.pytcheckHeartbeats    cCsG|js tStƒ}|j|kr)tS||j|jkrCtStS(N(RRRR R (R    R((s.\MergeProxyClientMgr.pytshouldSendHeartbeat s        cCstƒ|_dS(N(RR(R    ((s.\MergeProxyClientMgr.pytrefreshSendHeartbeatTick,s(t__name__t
__module__R R
R RRR(((s.\MergeProxyClientMgr.pyR
s     
             tMergeServerProxyClientMgrcBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    RS(cCsi|_i|_i|_dS(N(t*_MergeServerProxyClientMgr__sessionIDIndext+_MergeServerProxyClientMgr__clientGUIDIndext1_MergeServerProxyClientMgr__operatorServerIDIndex(R    ((s.\MergeProxyClientMgr.pyR
1s        cCs|jj|ƒS(N(Rtget(R    tguid((s.\MergeProxyClientMgr.pytfindClientByGUID6scCs|S(N((R    R((s.\MergeProxyClientMgr.pytgetCompoundKey9scCsC||j|j<||j|j<|j|jƒ}||j|<dS(N(RRRRRRR(R    tclientt compoundKey((s.\MergeProxyClientMgr.pyt    addClient<scCsÙ|j|ƒ}|s8t|||ƒ}|j|ƒdS|j}|j|jƒ}||_||_t|_|j|ƒ}|jj    |ƒrœ|j|=n||j|<|j
j    |ƒrÈ|j
|=n||j
|<dS(N( RRRRRRRRRthas_keyR(R    RRRRt oldSessionIDt
compoudKeytnewCompoundKey((s.\MergeProxyClientMgr.pyt updateClientBs"                    cCs|j|ƒ}|jj|ƒS(N(RRR(R    RR((s.\MergeProxyClientMgr.pytfindClientByCompoundKeyYscCs|jj|ƒS(N(RR(R    R((s.\MergeProxyClientMgr.pytfindClientBySessionID]scCs |jjƒS(N(Rtvalues(R    ((s.\MergeProxyClientMgr.pyt getClientList`s(
RRR
RRRR#R$R%R'(((s.\MergeProxyClientMgr.pyR0s                            cCststƒantS(N(t__gMergeProxyClientMgrR(((s.\MergeProxyClientMgr.pytgetMergeProxyClientMgres N(((RRRtNoneR(R)(((s.\MergeProxyClientMgr.pyt<module>s&3