@Override public void transitionState( final AutoScalingGroupMetadata group, final LifecycleState from, final LifecycleState to, final Collection<String> instanceIds) throws AutoScalingMetadataException { final AutoScalingInstance example = exampleForGroup(group); example.setLifecycleState(from); updateInstances(example, from, from.transitionTo(to), instanceIds); }
/** * A description of the current lifecycle state. Note that the <code>Quarantined</code> state is * not used. * * @param lifecycleState A description of the current lifecycle state. Note that the <code> * Quarantined</code> state is not used. * @return Returns a reference to this object so that method calls can be chained together. * @see LifecycleState */ public void setLifecycleState(LifecycleState lifecycleState) { this.lifecycleState = lifecycleState.toString(); }
/** * Contains a description of the current <i>lifecycle</i> state. <note> * * <p>The <code>Quarantined</code> lifecycle state is currently not used. </note> * * <p>Returns a reference to this object so that method calls can be chained together. * * <p><b>Constraints:</b><br> * <b>Allowed Values: </b>Pending, Quarantined, InService, Terminating, Terminated * * @param lifecycleState Contains a description of the current <i>lifecycle</i> state. <note> * <p>The <code>Quarantined</code> lifecycle state is currently not used. </note> * @return A reference to this updated object so that method calls can be chained together. * @see LifecycleState */ public Instance withLifecycleState(LifecycleState lifecycleState) { this.lifecycleState = lifecycleState.toString(); return this; }
@Override public int hashCode() { return state != null ? state.hashCode() : 0; }