All Known Implementing Classes:
TimeoutableCancellationToken

@API(status=STABLE, since="2.0.0-beta.3") public interface CancellationToken
A token that can be used to cancel an ongoing crafting calculation. When isCancelled() returns true, the calculation will stop as soon as possible by throwing a CancellationException.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CancellationToken
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
     
  • Field Details

  • Method Details

    • isCancelled

      boolean isCancelled()
    • cancel

      void cancel()