コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
 /**
  * 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();
 }
コード例 #3
0
 /** Removes this StateWaiter as a ControllerListener of the Controller */
 private void removeAsListener() {
   controller.removeControllerListener(this);
   listening = false;
 }
コード例 #4
0
 /** Adds this StateWaiter as a ControllerListener of the Controller */
 private void addAsListener() {
   if (!listening) {
     controller.addControllerListener(this);
     listening = true;
   }
 }
コード例 #5
0
 /**
  * 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();
 }