question: private void computeMaxLeases ( ) { if ( inRecovery ) return ; maxServiceLease = Math . max ( minMaxServiceLease , minRenewalInterval * ( serviceByID . size ( ) + ( ( eventByID . size ( ) * minMaxServiceLease ) / minMaxEventLease ) ) ) ; maxEventLease = Math . max ( minMaxEventLease , ( ( maxServiceLease * minMaxEventLease ) / minMaxServiceLease ) ) ; }
target:  Compute new maxServiceLease and maxEventLease values.  This needs to be called whenever the number of services (#S) or number of events (#E) changes, or whenever any of the configuration parameters change. The two base equations driving the computation are: #S/maxServiceLease + #E/maxEventLease <= 1/minRenewalInterval maxServiceLease/maxEventLease = minMaxServiceLease/minMaxEventLease