1 package emissary.core; 2 3 public interface IPausable { 4 5 /** 6 * Stop taking work 7 */ 8 default void pause() {} 9 10 /** 11 * Resume taking work 12 */ 13 default void unpause() {} 14 15 /** 16 * Check to see if the current thread is paused 17 * 18 * @return true if work is paused, false otherwise 19 */ 20 default boolean isPaused() { 21 return false; 22 } 23 }