Class ResourceAllocation

java.lang.Object
com.teracloud.streams.rest.Element
com.teracloud.streams.rest.ResourceAllocation

public class ResourceAllocation extends Element
Access to information about a resource that is allocated to a Streams instance.
Since:
1.9
  • Constructor Details

    • ResourceAllocation

      public ResourceAllocation()
  • Method Details

    • getResourceType

      public String getResourceType()
      Identifies the REST resource type
      Returns:
      "resourceAllocation"
    • isApplicationResource

      public boolean isApplicationResource()
      Indicates whether the resource is an application resource. Application resources are used to run streams processing applications.
      Returns:
      true if this is an application resource otherwise false.
    • getSchedulerStatus

      public String getSchedulerStatus()
      Status of the resource. Some possible values for this property include failed, partiallyFailed, partiallyRunning, quiesced, quiescing, running, restarting, resuming, starting, stopped, and unknown.
      Returns:
      Status of the resource.
    • getStatus

      public String getStatus()
      Scheduler status of the resource. When a resource is schedulable it is available for running streams processing applications.
      Returns:
      Status of the resource.
    • getResource

      public Resource getResource() throws IOException
      Obtain the Resource object for detailed information on the resource.
      Returns:
      Resource.
      Throws:
      IOException - Exception communicating with Streams instance.
    • getInstance

      public Instance getInstance() throws IOException
      Obtain the Instance this resource is allocated to.
      Returns:
      Instance this resource is allocated to.
      Throws:
      IOException - Exception communicating with Streams instance.
    • getJobs

      public List<Job> getJobs() throws IOException
      Gets a list of jobs running on this resource in this instance.
      Returns:
      List of Streams Jobs
      Throws:
      IOException - Exception communicating with Streams instance.
    • getPes

      public List<ProcessingElement> getPes() throws IOException
      Gets a list of processing elements running on this resource in this instance.
      Returns:
      List of Processing Elements
      Throws:
      IOException - Exception communicating with Streams instance.