Class BeveragePourSequence

java.lang.Object
com.tccc.kos.ext.dispense.pipeline.beverage.BeveragePourSequence

public class BeveragePourSequence extends Object
A list of Pourable objects that will be poured in order as an atomic operation. Each Pourable will be passed to the pour engine to convert the Pourable to a FutureWork that will execute the pourable. It is possible to define new Pourable classes that perform non-pouring processes that should be part of the overall pour process, such as pausing or dispensing ice.

A PourSequence also support pour limits. A limit will pour the expected volume for each pourable in the sequence until the volume limit is hit, effectively ending the pour early. This differs from changing the overall volume of the sequence where the volumes per pourable will be reduced to run the entire sequence. These options are particularly useful in controlled pour applications.

Since:
1.0
Version:
2023-08-10
  • Constructor Details

    • BeveragePourSequence

      public BeveragePourSequence()
  • Method Details

    • getTotalVolume

      public double getTotalVolume()
      Return the total volume of the pour. This may not be the amount poured if there is a limit volume.
    • getLimitVolume

      public double getLimitVolume()
      Return the volume limit of the pour. If >= zero, this is how much of the total volume will actually be poured.
    • setLimitVolume

      public void setLimitVolume(double limitVolume)
      Set the limit volume of the pour in milliliters. If this is greater than or equal to zero, only this portion of the pour will be poured (negative value disables the limit). All pourables will still pour the expected volume based on the total volume, but total output will be limited to the limit volume. If limit volume is less than total volume, the pour will end early and some pourables may not be poured as a result.

      If the limit it set higher than the total volume, it will be adjusted to match the total volume.

      Parameters:
      limitVolume - pour limit, negative to disable
    • getEffectiveVolume

      public double getEffectiveVolume()
      Return the total volume of the pour. This is the sum of all the pourable volumes constrained by any applied limit.