@ConfigurationProperties(prefix="genie.jobs.active-limit")
@Validated
public class JobsActiveLimitProperties
extends java.lang.Object
implements org.springframework.context.EnvironmentAware
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COUNT
Default value for active user job limit count.
|
static boolean |
DEFAULT_ENABLED
Default value for active user job limit enabled.
|
static java.lang.String |
ENABLED_PROPERTY
The property key for whether this feature is enabled or not.
|
static java.lang.String |
PROPERTY_PREFIX
The property prefix for job user limiting.
|
static java.lang.String |
USER_LIMIT_OVERRIDE_PROPERTY_PREFIX
The property key prefix for per-user limit.
|
Constructor and Description |
---|
JobsActiveLimitProperties() |
Modifier and Type | Method and Description |
---|---|
int |
getUserLimit(java.lang.String user)
Get the maximum number of jobs a user is allowed to run concurrently.
|
void |
setEnvironment(org.springframework.core.env.Environment environment) |
public static final java.lang.String PROPERTY_PREFIX
public static final java.lang.String ENABLED_PROPERTY
public static final java.lang.String USER_LIMIT_OVERRIDE_PROPERTY_PREFIX
public static final boolean DEFAULT_ENABLED
public static final int DEFAULT_COUNT
public int getUserLimit(java.lang.String user)
user
- the user namepublic void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment
in interface org.springframework.context.EnvironmentAware