示例#1
0
 public void acceptOrder(Order order, Warehouse warehouse) {
   CookWholeOrder cookingOrder =
       new CookWholeOrder(order, warehouse, this); // Creating the Callable.
   raisePressure(order.getDifficultyRating());
   _futureOrders.add(
       _superExecutor.submit(
           cookingOrder)); // Submitting the Callable, and adding the future object to the vector.
   // Logger message for accepting new order.
   logger.info("ORDER {} HAS BEEN ACCEPTED", order.getID());
 }
示例#2
0
 public void releaseOrder(Order order) { // Release the order back to the management.
   _management.getOrder(order);
   decreasePressure(order.getDifficultyRating());
   // Logger message for completing an order.
   logger.info(" ORDER {} IS COMPLETED", order.getID());
 }