Class CancelHandler

  • All Implemented Interfaces:
    Serializable

    public class CancelHandler
    extends Object
    implements Serializable
    Used to optionally cancel future work. Using Futures would also require keeping track of them somewhere else. This alternative allows a single object which can cancel thousands of tasks that are tied to it.
    See Also:
    Serialized Form
    • Constructor Detail

      • CancelHandler

        public CancelHandler()
    • Method Detail

      • cancel

        public void cancel​(boolean useForce)
      • isCancelled

        public boolean isCancelled()
      • isForcefullyCancelled

        public boolean isForcefullyCancelled()
      • trackActiveWork

        public void trackActiveWork​(Thread t)
      • untrackActiveWork

        public void untrackActiveWork​(Thread t)