Class JCloudsComputer

All Implemented Interfaces:
ExtensionPoint, DescriptorByNameOwner, ExecutorListener, ModelObject, SearchableModelObject, SearchItem, AccessControlled, ModelObjectWithContextMenu, HasWidgets, org.jenkinsci.plugins.cloudstats.TrackedItem, StaplerProxy

public class JCloudsComputer extends AbstractCloudComputer<JCloudsSlave> implements org.jenkinsci.plugins.cloudstats.TrackedItem
JClouds version of Jenkins SlaveComputer - responsible for terminating an instance.
Author:
Vijay Kiran
  • Constructor Details

    • JCloudsComputer

      public JCloudsComputer(JCloudsSlave slave)
  • Method Details

    • getInstanceId

      public String getInstanceId()
    • getRetentionTime

      public int getRetentionTime()
    • getIsPendingDelete

      public boolean getIsPendingDelete()
    • getCloudName

      @CheckForNull public String getCloudName()
    • doDoDelete

      public HttpResponse doDoDelete() throws IOException
      Deletes a jenkins slave node. The node is first marked pending delete and the actual deletion will be performed at the next run of JCloudsCleanupThread. If called again after already being marked, the deletion is performed immediately.
      Overrides:
      doDoDelete in class AbstractCloudComputer<JCloudsSlave>
      Throws:
      IOException
    • deleteSlave

      public void deleteSlave() throws IOException, InterruptedException
      Delete the slave, terminate or suspend the instance. Can be called either by doDoDelete() or from JCloudsRetentionStrategy. Whether the instance gets terminated or suspended is handled in JCloudsSlave._terminate(hudson.model.TaskListener)
      Throws:
      InterruptedException - if the deletion gets interrupted.
      IOException - if an error occurs.
    • deleteSlave

      public void deleteSlave(boolean logging)
      Delete the slave, terminate or suspend the instance. Like deleteSlave(), but catching all exceptions and logging the if desired.
      Parameters:
      logging - true, if exception logging is desired.
    • getPublicIpAddressHeader

      public String getPublicIpAddressHeader()
    • getPrivateIpAddressHeader

      public String getPrivateIpAddressHeader()
    • getPublicIpAddresses

      public String getPublicIpAddresses()
    • getPrivateIpAddresses

      public String getPrivateIpAddresses()
    • getId

      @Nullable public org.jenkinsci.plugins.cloudstats.ProvisioningActivity.Id getId()
      Specified by:
      getId in interface org.jenkinsci.plugins.cloudstats.TrackedItem