Class MachineSpec.Static.Builder

java.lang.Object
me.ahoo.cosid.runtime.MachineSpec.Static.Builder
Enclosing class:
MachineSpec.Static

public static final class MachineSpec.Static.Builder extends Object
  • Method Details

    • bits

      public MachineSpec.Static.Builder bits(int bits)
      Sets the slot bits.
      Parameters:
      bits - the slot bits; default 10
      Returns:
      this builder
    • stateFile

      public MachineSpec.Static.Builder stateFile(Path stateFile)
      Sets the window file.
      Parameters:
      stateFile - the window file; default none, which means no clock regression protection
      Returns:
      this builder
    • ahead

      public MachineSpec.Static.Builder ahead(Duration ahead)
      Sets how far ahead the ceiling is written.
      Parameters:
      ahead - the distance; default 10s
      Returns:
      this builder
    • notBefore

      public MachineSpec.Static.Builder notBefore(Instant notBefore)
      Sets the floor when the file does not exist yet (given by the migration tool).
      Parameters:
      notBefore - the floor; default none
      Returns:
      this builder
    • namespace

      public MachineSpec.Static.Builder namespace(String namespace)
      Sets the namespace the machine belongs to (D37); a static machine leases nothing, but its namespace tells the machines of a runtime apart in events, metrics and health.
      Parameters:
      namespace - the namespace; default the RuntimeSpec.namespace()
      Returns:
      this builder
    • build

      public MachineSpec.Static build()
      Builds the static slot.
      Returns:
      the static slot