Interface ProcessControl


@NonExtendable public interface ProcessControl
The machine's process slot (ARCHITECTURE.md ยง13, D15). Every operation is one transaction: resources are never lost. Owner thread only.
  • Method Details

    • current

      @Nullable @Nullable ProcessView current()
    • start

      @NotNull @NotNull Result<ProcessView> start(@NotNull @NotNull ProcessingRecipe recipe, @NotNull @NotNull ProcessBinding binding)
      Consumes the recipe's inputs into the in-flight buffer and starts the process.
      Returns:
      the new process, or an error (e.g. insufficient input, a process already running)
    • advance

      @NotNull @NotNull ProcessStatus advance()
      Advances by the ticks elapsed since the machine last ticked: pays costs, makes progress, and delivers outputs when done. Retries delivering outputs or returning inputs if pending.
    • advance

      @NotNull @NotNull ProcessStatus advance(long ticks)
      Like advance(), but by exactly ticks ticks (at most what remains).
    • cancel

      @NotNull @NotNull ProcessStatus cancel()
      Cancels the process and returns its in-flight inputs to the input storages.