Ejemplo n.º 1
0
 @Override
 public synchronized void start() throws IOException {
   // don't allow thread to be "started twice"
   if (thd.stopped) {
     thd.stopped = false;
     thd.start();
   }
 }
Ejemplo n.º 2
0
 @Override
 public synchronized void stop() throws IOException {
   thd.stopped = true;
   try {
     source.close();
   } catch (InterruptedException ee) {
     LOG.error(ee.getMessage());
   }
 }
Ejemplo n.º 3
0
 @Override
 public boolean join(long ms) throws InterruptedException {
   final PumperThread t = thd;
   t.join(ms);
   return !t.isAlive();
 }
Ejemplo n.º 4
0
 /** Start the mean shutdown. */
 public void cancel() {
   thd.interrupt();
 }