Package org.eclipse.hono.config
Class ApplicationConfigProperties
- java.lang.Object
-
- org.eclipse.hono.config.ApplicationConfigProperties
-
public class ApplicationConfigProperties extends Object
Configuration of common properties that are valid for an application (and not only a specific server).
-
-
Constructor Summary
Constructors Constructor Description ApplicationConfigProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxInstances()
Gets the number of verticle instances to deploy.int
getStartupTimeout()
Gets the maximum time to wait for the server to start up.void
setMaxInstances(int maxVerticleInstances)
Sets the number of verticle instances to deploy.void
setStartupTimeout(int seconds)
Sets the maximum time to wait for the server to start up.
-
-
-
Method Detail
-
getStartupTimeout
public final int getStartupTimeout()
Gets the maximum time to wait for the server to start up.- Returns:
- The number of seconds to wait.
-
setStartupTimeout
public final void setStartupTimeout(int seconds)
Sets the maximum time to wait for the server to start up.The default value of this property is 20 (seconds).
- Parameters:
seconds
- The maximum number of seconds to wait.- Throws:
IllegalArgumentException
- if seconds < 1.
-
getMaxInstances
public final int getMaxInstances()
Gets the number of verticle instances to deploy.The number is calculated as follows:
- if 0 < maxInstances < #processors, then return maxInstances
- else return
Runtime.getRuntime().availableProcessors()
- Returns:
- the number of verticles to deploy.
-
setMaxInstances
public final void setMaxInstances(int maxVerticleInstances)
Sets the number of verticle instances to deploy.The default value of this property is 0.
- Parameters:
maxVerticleInstances
- The number of verticles to deploy.- Throws:
IllegalArgumentException
- if the number is < 0.
-
-