()
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public void run() |
| 77 | { |
| 78 | try |
| 79 | { |
| 80 | if(lastStep != null) |
| 81 | lastStep.run(); |
| 82 | if(latch != null) |
| 83 | latch.countDown(); |
| 84 | if(barrier != null) |
| 85 | barrier.await(); |
| 86 | } |
| 87 | catch (InterruptedException ex) |
| 88 | { |
| 89 | Logger.getLogger(PoisonRunnable.class.getName()).log(Level.SEVERE, null, ex); |
| 90 | } |
| 91 | catch (BrokenBarrierException ex) |
| 92 | { |
| 93 | Logger.getLogger(PoisonRunnable.class.getName()).log(Level.SEVERE, null, ex); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | } |