stagesupport/src/main/java/com/streamsets/pipeline/lib/util/ThreadUtil.java
public static boolean sleep(long milliseconds) {
    //checking if we got pre-interrupted.
    boolean interrupted = Thread.interrupted();
    if (!interrupted) {
      try {
        Thread.sleep(milliseconds);
      } catch (InterruptedException ex) {
        interrupted = true;
        // clearing the interrupt flag
        Thread.interrupted();
      }
    }
    return !interrupted;
  }
public static boolean sleep(long milliseconds) {
    //checking if we got pre-interrupted.
    boolean interrupted = Thread.interrupted();
    if (!interrupted) {
      try {
        Thread.sleep(milliseconds);
      } catch (InterruptedException ex) {
        interrupted = true;
        // clearing the interrupt flag
        Thread.interrupted();
      }
    }
    return !interrupted;
  }
public static boolean sleep ( long milliseconds ) { //checking if we got pre-interrupted. boolean interrupted = Thread . interrupted ( ) ; if ( ! interrupted ) { try { Thread . sleep ( milliseconds ) ; } catch ( InterruptedException ex ) { interrupted = true ; // clearing the interrupt flag Thread . interrupted ( ) ; } } return ! interrupted ; }
<p>
Puts the current thread to sleep for the specified number of milliseconds.
</p>
<p>
If the thread was interrupted before the sleep method is called, the sleep method wont sleep.
</p>
@param milliseconds number of milliseconds to sleep.

@return <code>true</code> if the thread slept uninterrupted for the specified milliseconds, <code>false</code> if
it was interrupted.
<p > Puts the current thread to sleep for the specified number of milliseconds . < / p > <p > If the thread was interrupted before the sleep method is called the sleep method wont sleep . < / p > @param milliseconds number of milliseconds to sleep .