Class Configuration
java.lang.Object
uk.ac.manchester.spinnaker.spalloc.Configuration
public class Configuration extends Object
A spalloc configuration loaded from a file.
-
Constructor Summary
Constructors Constructor Description Configuration(String configFilename)
Load the configuration from a file. -
Method Summary
Modifier and Type Method Description Map<String,Object>
getDefaults()
String
getHost()
@javax.validation.constraints.Positive double
getKeepalive()
String
getMachine()
@PositiveOrZero Integer
getMaxDeadBoards()
@PositiveOrZero Integer
getMaxDeadLinks()
@javax.validation.constraints.PositiveOrZero double
getMinRatio()
@uk.ac.manchester.spinnaker.utils.validation.TCPPort int
getPort()
@javax.validation.constraints.Positive double
getReconnectDelay()
boolean
getRequireTorus()
String[]
getTags()
@javax.validation.constraints.Positive double
getTimeout()
@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
- Returns:
- The keepalive interval, in seconds.
-
getReconnectDelay
- Returns:
- The reconnection delay, in seconds.
-
getTimeout
- Returns:
- The network timeout, in seconds.
-
getMachine
- Returns:
- The desired machine name.
-
getTags
- Returns:
- The desired machine tags.
-
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.
-