return consumers_.size() + selfConsumer;
return selfConsumer; } consumers_ = new HashSet(); RelationshipSchedule rs = myOrganization_.getRelationshipSchedule(); Collection consumerRelations_ = rs.getMatchingRelationships(consumerRole_); Iterator consumerRelationIterator = consumerRelations_.iterator();  if (logger.isDebugEnabled()) { logger.debug(myOrgName_ + " adding consumers of " + consumerRole_); } while (consumerRelationIterator.hasNext()) { String customer = ((Organization) ((Relationship) consumerRelationIterator.next()).getA()).getClusterPG().getMessageAddress().toString(); if (logger.isDebugEnabled()) { logger.debug(myOrgName_ + " adding " + customer); } consumers_.add(customer); }
    private int getConsumerCount() {        if (consumers_ == null) {            if (consumerRole_ == null) {                System.out.println(myOrgName_ + " null consumerRole_");                return selfConsumer;            }            consumers_ = new HashSet();            RelationshipSchedule rs = myOrganization_.getRelationshipSchedule();            Collection consumerRelations_ = rs.getMatchingRelationships(consumerRole_);            Iterator consumerRelationIterator= consumerRelations_.iterator();            /* Count consumers using a set in case of time-phased relationships */            System.out.println(myOrgName_ + " adding consumers of " + consumerRole_);            while (consumerRelationIterator.hasNext()) {                String customer = ((Organization)((Relationship)consumerRelationIterator.next()).getA()).                    getClusterPG().getMessageAddress().toString();                System.out.println(myOrgName_ + " adding " + customer);                consumers_.add(customer);            }        }        return consumers_.size() + selfConsumer;    }