Class RuntimeSpec.Builder

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

public static final class RuntimeSpec.Builder extends Object
Builds a RuntimeSpec.
  • Method Details

    • store

      public RuntimeSpec.Builder store(String name, StoreSpec store)
      Declares a store, replacing one of the same name.
      Parameters:
      name - the store name
      store - the store
      Returns:
      this builder
    • machine

      public RuntimeSpec.Builder machine(MachineSpec machine)
      Sets the machine slot; required when a time-based generator exists.
      Parameters:
      machine - the machine slot; default none
      Returns:
      this builder
    • machine

      public RuntimeSpec.Builder machine(String name, MachineSpec machine)
      Declares a named machine (D37), replacing one of the same name; it starts only when an enabled time-based generator chooses it.
      Parameters:
      name - the machine name, not "default"
      machine - the machine; give it a namespace of its own (namespace(...))
      Returns:
      this builder
    • generator

      public RuntimeSpec.Builder generator(String name, GeneratorSpec generator)
      Declares a generator, replacing one of the same name.
      Parameters:
      name - the generator name; "default" is the 4.x share
      generator - the generator
      Returns:
      this builder
    • removeGenerator

      public RuntimeSpec.Builder removeGenerator(String name)
      Removes a generator, if declared.
      Parameters:
      name - the generator name
      Returns:
      this builder
    • build

      public RuntimeSpec build()
      Builds the spec.
      Returns:
      the spec
      Throws:
      IllegalArgumentException - if the namespace is blank