/**
  * Calls realize() on the Controller and blocks the current thread until the Controller is
  * Realized.
  *
  * @return boolean indicating whether the transition was successful.
  */
 public boolean blockingRealize() {
   setState(Controller.Realized);
   controller.realize();
   return waitForState();
 }
 /**
  * Calls prefetch() on the Controller and blocks the current thread until the Controller is
  * Prefetched.
  *
  * @return boolean indicating whether the transition was successful.
  */
 public boolean blockingPrefetch() {
   setState(Controller.Prefetched);
   controller.prefetch();
   return waitForState();
 }
 /** Removes this StateWaiter as a ControllerListener of the Controller */
 private void removeAsListener() {
   controller.removeControllerListener(this);
   listening = false;
 }
 /** Adds this StateWaiter as a ControllerListener of the Controller */
 private void addAsListener() {
   if (!listening) {
     controller.addControllerListener(this);
     listening = true;
   }
 }
 /**
  * Calls syncStart() on the Controller and blocks the current thread until the Controller is
  * Started. This could throw a ClockStartedError if the Controller is not in the Prefetched state.
  *
  * @return boolean indicating whether the transition was successful.
  */
 public boolean blockingSyncStart(Time t) {
   setState(Controller.Started);
   controller.syncStart(t);
   return waitForState();
 }