Package com.netflix.genie.web.properties
Class JobsActiveLimitProperties
java.lang.Object
com.netflix.genie.web.properties.JobsActiveLimitProperties
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.EnvironmentAware
@ConfigurationProperties(prefix="genie.jobs.active-limit")
@Validated
public class JobsActiveLimitProperties
extends Object
implements org.springframework.context.EnvironmentAware
Properties related to number of active jobs per user.
- Since:
- 3.1.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default value for active user job limit count.static final boolean
Default value for active user job limit enabled.static final String
The property key for whether this feature is enabled or not.static final String
The property prefix for job user limiting.static final String
The property key prefix for per-user limit. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getUserLimit
(String user) Get the maximum number of jobs a user is allowed to run concurrently.void
setEnvironment
(org.springframework.core.env.Environment environment)
-
Field Details
-
PROPERTY_PREFIX
The property prefix for job user limiting.- See Also:
-
ENABLED_PROPERTY
The property key for whether this feature is enabled or not.- See Also:
-
USER_LIMIT_OVERRIDE_PROPERTY_PREFIX
The property key prefix for per-user limit.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDDefault value for active user job limit enabled.- See Also:
-
DEFAULT_COUNT
public static final int DEFAULT_COUNTDefault value for active user job limit count.- See Also:
-
-
Constructor Details
-
JobsActiveLimitProperties
public JobsActiveLimitProperties()
-
-
Method Details
-
getUserLimit
Get the maximum number of jobs a user is allowed to run concurrently. Checks whether the user has a special limit associated, and if not it returns the global default.- Parameters:
user
- the user name- Returns:
- the maximum number of jobs
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
-