Enumeration inventories = inventoryPlugin_.getInventoryBins(supplyType_); changedSet_ = new HashSet(); while (inventories.hasMoreElements()) { changedSet_.add(inventories.nextElement()); } System.out.println("#####"+clusterId_+" is running because (inventoryPlugin_.getDetermineRequirementsTask() == null)");
Enumeration inventories = inventoryPlugin_.getInventoryBins(supplyType_); changedSet_ = new HashSet(); while (inventories.hasMoreElements()) { changedSet_.add(inventories.nextElement()); } if (logger.isDebugEnabled()) { logger.debug("#####" + clusterId_ + " is running because (inventoryPlugin_.getDetermineRequirementsTask() == null)"); }
  public void update() {    // Skeleton algorithm (Template Method pattern)  (learned at JavaOne)    // Used by all concrete subclasses    super.update();    // RJB keep track of inventories that need to be run, until you actually run them    changedSet_ = needUpdate(changedSet_);    Iterator changedInventories = changedSet_.iterator();    if (!changedSet_.isEmpty()) {      printDebug(2,"\n\n\nBEGIN CYCLE___________________________________________\n");	          if (inventoryPlugin_.getDetermineRequirementsTask() == null) {	Enumeration inventories = inventoryPlugin_.getInventoryBins(supplyType_);	changedSet_ = new HashSet();	while (inventories.hasMoreElements()) {	  changedSet_.add(inventories.nextElement());	}	System.out.println("#####"+clusterId_+" is running because (inventoryPlugin_.getDetermineRequirementsTask() == null)"); 	handleRescinds();	// RJB now we have handled all inventories	changedSet_=null;      } else if (inventoryPlugin_.hasSeenAllConsumers()) {	handleChangedInventories();	// RJB now we have handled all inventories	changedSet_=null;      }      printDebug(2,"\n\nEND CYCLE___________________________________________\n\n");    }  }