StationResourceIfc

The operational contract a station programs against for its resource. This is the seam that lets a station use either a simple SResource or, later, a resource pool, without depending on a concrete type. It adds the mutating operations (seize/release, capacity changes, schedule attachment, and an availability listener) to the read-only SResourceCIfc.

Inheritors

Functions

Link copied to clipboard

Registers a listener notified when available units increase.

Link copied to clipboard
abstract fun changeCapacity(value: Int)

Sets the current capacity to value (may be 0, e.g., off-shift).

Link copied to clipboard
abstract fun release(amount: Int = 1)

Releases amount units.

Link copied to clipboard
abstract fun seize(amount: Int = 1)

Seizes amount units. The caller must ensure availability first.

Link copied to clipboard
abstract fun useSchedule(schedule: CapacitySchedule)

Drives this resource's capacity from a CapacitySchedule (IGNORE-rule semantics).