private void addService(SvcReg reg){
  serviceByID.put(reg.item.serviceID,reg);
  serviceByTime.put(reg,reg);
  addServiceByTypes(reg.item.serviceType,reg);
  EntryRep[] entries=reg.item.attributeSets;
  for (int i=entries.length; --i >= 0; ) {
    addAttrs(reg,entries[i]);
  }
  computeMaxLeases();
}

private void addService ( SvcReg reg ) { serviceByID . put ( reg . item . serviceID , reg ) ; serviceByTime . put ( reg , reg ) ; addServiceByTypes ( reg . item . serviceType , reg ) ; EntryRep [ ] entries = reg . item . attributeSets ; for ( int i = entries . length ; -- i >= 0 ; ) { addAttrs ( reg , entries [ i ] ) ; } computeMaxLeases ( ) ; }
add a service to our state . this includes putting it in the servicebyid map under the serviceid , in the servicebytime map , in the servicebytype map under the service ' s most - specific servicetype , and in the servicebyattr map under all of its attribute values , incrementing the number of instances of each entryclass , and updating entryclasses as necessary . if this is the first instance of that servicetype registered , then we need to add concrete class information to the type and all supertypes .
