void waitUntilReady() {
   synchronized (readyLock) {
     while (!isReady) {
       try {
         readyLock.wait();
       } catch (InterruptedException e) {
         e.printStackTrace();
       }
     }
   }
   logger.debug("Done waiting for Client ({}) to be ready.", id);
 }
 void waitForCompletion() {
   synchronized (completeLock) {
     while (!isComplete) {
       try {
         completeLock.wait();
       } catch (InterruptedException e) {
         e.printStackTrace();
       }
     }
   }
   logger.debug("Done waiting for Client ({}) to complete.", id);
 }