Class Configuration
java.lang.Object
uk.ac.manchester.spinnaker.spalloc.Configuration
A spalloc configuration loaded from a file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHost()
@jakarta.validation.constraints.Positive double
@PositiveOrZero Integer
@PositiveOrZero Integer
@jakarta.validation.constraints.PositiveOrZero double
@uk.ac.manchester.spinnaker.utils.validation.TCPPort int
getPort()
@jakarta.validation.constraints.Positive double
boolean
String[]
getTags()
@jakarta.validation.constraints.Positive double
@NotBlank String
getUser()
-
Constructor Details
-
Configuration
Load the configuration from a file. The configuration loader searches from the file in various "sensible" places.- Parameters:
configFilename
- The name of file to load from.- Throws:
RuntimeException
- If the configuration could not be loaded.
-
-
Method Details
-
getDefaults
- Returns:
- a clone of the map of the configuration.
-
getHost
- Returns:
- The spalloc TCP/IP host.
-
getPort
- Returns:
- The spalloc TCP/IP port.
-
getUser
- Returns:
- The spalloc user.
-
getKeepalive
@Positive public @jakarta.validation.constraints.Positive double getKeepalive()- Returns:
- The keepalive interval, in seconds.
-
getReconnectDelay
@Positive public @jakarta.validation.constraints.Positive double getReconnectDelay()- Returns:
- The reconnection delay, in seconds.
-
getTimeout
@Positive public @jakarta.validation.constraints.Positive double getTimeout()- Returns:
- The network timeout, in seconds.
-
getMachine
- Returns:
- The desired machine name.
-
getTags
- Returns:
- The desired machine tags.
-
getMinRatio
@PositiveOrZero public @jakarta.validation.constraints.PositiveOrZero double getMinRatio()- Returns:
- The minimum ratio for rectangular allocations.
-
getMaxDeadBoards
- Returns:
- The maximum number of dead boards wanted.
-
getMaxDeadLinks
- Returns:
- The maximum number of dead links desired. Often ignored.
-
getRequireTorus
public boolean getRequireTorus()- Returns:
- Whether a torus is required. Not normally useful.
-