Class VSphereCloudRetentionStrategy

All Implemented Interfaces:
ExtensionPoint, Describable<RetentionStrategy<?>>

public class VSphereCloudRetentionStrategy extends CloudRetentionStrategy
Retains a cloud computer until it has been idle for getIdleMinutes() minutes (that part is delegated straight to CloudRetentionStrategy), OR -- optionally -- until it has existed for getLifespanMinutes() minutes in total, whichever happens first. For example, "keep a computer around until it's been idle for an hour, or two days have passed, whichever comes first".

lifespanMinutes defaults to 0, which disables the age-based cap entirely and reproduces this plugin's original keep-until-idle-only behaviour exactly, so existing configurations are unaffected unless they opt in.

This subsumes what used to be a separate "fixed lifespan" retention strategy evaluated originally in pull request https://github.com/jenkinsci/vsphere-cloud-plugin/pull/96/ : rather than make the user choose one or the other, both conditions are available together on this one strategy.