java.lang.Object
me.ahoo.cosid.runtime.RuntimeSpec.Builder
- Enclosing class:
RuntimeSpec
Builds a
RuntimeSpec.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the spec.generator(String name, GeneratorSpec generator) Declares a generator, replacing one of the same name.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.machine(MachineSpec machine) Sets the machine slot; required when a time-based generator exists.removeGenerator(String name) Removes a generator, if declared.Declares a store, replacing one of the same name.
-
Method Details
-
store
Declares a store, replacing one of the same name.- Parameters:
name- the store namestore- the store- Returns:
- this builder
-
machine
Sets the machine slot; required when a time-based generator exists.- Parameters:
machine- the machine slot; default none- Returns:
- this builder
-
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
Declares a generator, replacing one of the same name.- Parameters:
name- the generator name; "default" is the 4.x sharegenerator- the generator- Returns:
- this builder
-
removeGenerator
Removes a generator, if declared.- Parameters:
name- the generator name- Returns:
- this builder
-
build
Builds the spec.- Returns:
- the spec
- Throws:
IllegalArgumentException- if the namespace is blank
-