public void run() {
   try {
     while (!Thread.interrupted()) {
       TimeUnit.MILLISECONDS.sleep(rand.nextInt(300));
       customers.put(new Customer(rand.nextInt(1000)));
     }
   } catch (InterruptedException e) {
     System.out.println("CustomerGenerator interrupted");
   }
   System.out.println("CustomerGenerator terminating");
 }