Class CreateScalingPolicy
- java.lang.Object
-
- org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy
-
- All Implemented Interfaces:
Comparable<CreateScalingPolicy>
- Direct Known Subclasses:
ScalingPolicy
public class CreateScalingPolicy extends Object implements Comparable<CreateScalingPolicy>
Auto Scale ScalingPolicy. This class is used for requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CreateScalingPolicy.Builder
static class
CreateScalingPolicy.ScalingPolicyScheduleType
Enumerates different types of targets a policy might havestatic class
CreateScalingPolicy.ScalingPolicyTargetType
Enumerates different types of targets a policy might havestatic class
CreateScalingPolicy.ScalingPolicyType
Enumerates different types of scaling policies
-
Constructor Summary
Constructors Modifier Constructor Description protected
CreateScalingPolicy(String name, CreateScalingPolicy.ScalingPolicyType type, int cooldown, String target, CreateScalingPolicy.ScalingPolicyTargetType targetType, Map<String,String> args)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CreateScalingPolicy.Builder
builder()
int
compareTo(CreateScalingPolicy that)
boolean
equals(Object obj)
int
getCooldown()
String
getName()
protected Map<String,String>
getSchedulingArgs()
String
getSchedulingString()
CreateScalingPolicy.ScalingPolicyScheduleType
getSchedulingType()
String
getTarget()
CreateScalingPolicy.ScalingPolicyTargetType
getTargetType()
CreateScalingPolicy.ScalingPolicyType
getType()
int
hashCode()
protected com.google.common.base.MoreObjects.ToStringHelper
string()
CreateScalingPolicy.Builder
toBuilder()
String
toString()
-
-
-
Constructor Detail
-
CreateScalingPolicy
@ConstructorProperties({"name","type","cooldown","target","targetType","args"}) protected CreateScalingPolicy(String name, CreateScalingPolicy.ScalingPolicyType type, int cooldown, String target, CreateScalingPolicy.ScalingPolicyTargetType targetType, Map<String,String> args)
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of this ScalingPolicy.
- See Also:
CreateScalingPolicy.Builder.name(String)
-
getType
public CreateScalingPolicy.ScalingPolicyType getType()
- Returns:
- the type for this ScalingPolicy.
- See Also:
CreateScalingPolicy.ScalingPolicyType
,CreateScalingPolicy.Builder#type(String)
-
getCooldown
public int getCooldown()
- Returns:
- the cooldown for this ScalingPolicy.
- See Also:
CreateScalingPolicy.Builder.cooldown(int)
-
getTarget
public String getTarget()
- Returns:
- the target for this ScalingPolicy. This is a numeric value, but could represent a 0-100% for some target types. Scale-down policies might have negative values.
- See Also:
CreateScalingPolicy.Builder#target(int)
-
getTargetType
public CreateScalingPolicy.ScalingPolicyTargetType getTargetType()
- Returns:
- the target type for this ScalingPolicy.
- See Also:
CreateScalingPolicy.ScalingPolicyTargetType
,CreateScalingPolicy.Builder#targetType(int)
-
getSchedulingArgs
protected Map<String,String> getSchedulingArgs()
- Returns:
- The scheduling string, if any.
- See Also:
CreateScalingPolicy.Builder.atSchedule(String)
,CreateScalingPolicy.Builder.cronSchedule(String)
-
getSchedulingString
public String getSchedulingString()
- Returns:
- The scheduling string, if any.
- See Also:
CreateScalingPolicy.Builder.atSchedule(String)
,CreateScalingPolicy.Builder.cronSchedule(String)
-
getSchedulingType
public CreateScalingPolicy.ScalingPolicyScheduleType getSchedulingType()
- Returns:
- The type of the schedule this policy uses.
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-
builder
public static CreateScalingPolicy.Builder builder()
-
toBuilder
public CreateScalingPolicy.Builder toBuilder()
-
compareTo
public int compareTo(CreateScalingPolicy that)
- Specified by:
compareTo
in interfaceComparable<CreateScalingPolicy>
-
-