/** True if the clients have all thrown a stop scheduling order on the task. */
 private boolean receivedStopSchedulingTaskOnClientOrder(TestTask task, Vector clients) {
   for (Iterator i = clients.iterator(); i.hasNext(); ) {
     ClientRecord client = (ClientRecord) i.next();
     if (!task.receivedStopSchedulingTaskOnClientOrder(client)) {
       return false;
     }
   }
   return true;
 }
  /**
   * Schedules the client with the task, if it is in the proper threadgroup and has not thrown a
   * stop scheduling order for it.
   */
  protected boolean schedule(ClientRecord client, TestTask task, long now) {
    if (task.usesThreadGroup(client.getThreadGroupName())
        && !task.receivedStopSchedulingTaskOnClientOrder(client)) {
      ClientVmRecord vm = client.vm();
      synchronized (vm) {
        if (vm.isLive()) {
          synchronized (client) {
            client.setBusy(true);
            client.setTask(task);
            client.setStartTime(now);

            synchronized (task) {
              task.incrementNumTimesInUse();
            }
            assignTask(client, task);
          }
        }
      }
      return true;

    } else {
      return false;
    }
  }
 /** True if the client has thrown a stop scheduling order on the task. */
 private boolean receivedStopSchedulingTaskOnClientOrder(TestTask task, ClientRecord client) {
   return task.receivedStopSchedulingTaskOnClientOrder(client);
 }