public static class CreateScalingPolicy.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
args |
protected int |
cooldown |
protected String |
name |
protected String |
target |
protected CreateScalingPolicy.ScalingPolicyTargetType |
targetType |
protected CreateScalingPolicy.ScalingPolicyType |
type |
Constructor and Description |
---|
CreateScalingPolicy.Builder() |
Modifier and Type | Method and Description |
---|---|
CreateScalingPolicy.Builder |
atSchedule(String at)
Optional.
|
CreateScalingPolicy |
build() |
CreateScalingPolicy.Builder |
cooldown(int cooldown)
Required.
|
CreateScalingPolicy.Builder |
cronSchedule(String cron)
Optional.
|
CreateScalingPolicy.Builder |
fromScalingPolicy(CreateScalingPolicy in) |
CreateScalingPolicy.Builder |
name(String name)
Required.
|
CreateScalingPolicy.Builder |
target(String target) |
CreateScalingPolicy.Builder |
targetType(CreateScalingPolicy.ScalingPolicyTargetType targetType) |
CreateScalingPolicy.Builder |
type(CreateScalingPolicy.ScalingPolicyType type)
Required.
|
protected String name
protected CreateScalingPolicy.ScalingPolicyType type
protected int cooldown
protected String target
protected CreateScalingPolicy.ScalingPolicyTargetType targetType
public CreateScalingPolicy.Builder name(String name)
name
- The name of this ScalingPolicy.CreateScalingPolicy.getName()
public CreateScalingPolicy.Builder type(CreateScalingPolicy.ScalingPolicyType type)
type
- The type for this ScalingPolicy.CreateScalingPolicy.ScalingPolicyType
,
CreateScalingPolicy.getType()
public CreateScalingPolicy.Builder cooldown(int cooldown)
cooldown
- The cooldown of this ScalingPolicy.CreateScalingPolicy.getCooldown()
public CreateScalingPolicy.Builder target(String target)
target
- The target of this ScalingPolicy.CreateScalingPolicy.getTarget()
public CreateScalingPolicy.Builder targetType(CreateScalingPolicy.ScalingPolicyTargetType targetType)
targetType
- The target type of this ScalingPolicy.CreateScalingPolicy.ScalingPolicyTargetType
,
CreateScalingPolicy.getTargetType()
public CreateScalingPolicy.Builder cronSchedule(String cron)
cron
- This parameter specifies the recurring time when the policy will be executed as a cron entry.
For example, if this is parameter is set to "1 0 * * *",
the policy will be executed at one minute past midnight (00:01)
every day of the month, and every day of the week.
You can either provide "cron" or "at" for a given policy, but not both.CreateScalingPolicy.ScalingPolicyTargetType
,
CreateScalingPolicy.getTargetType()
,
Cronpublic CreateScalingPolicy.Builder atSchedule(String at)
at
- This parameter specifies the time at which this policy will be executed.
This property is mutually exclusive with the "cron" parameter.
You can either provide "cron" or "at" for a given policy, but not both.
Example date string: "2013-12-05T03:12:00Z"CreateScalingPolicy.ScalingPolicyTargetType
,
CreateScalingPolicy.getTargetType()
public CreateScalingPolicy build()
public CreateScalingPolicy.Builder fromScalingPolicy(CreateScalingPolicy in)
in
- The target scaling policyCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.