Package com.teracloud.streams.rest
Class ResourceAllocation
java.lang.Object
com.teracloud.streams.rest.Element
com.teracloud.streams.rest.ResourceAllocation
Access to information about a resource that is allocated to a Streams instance.
- Since:
- 1.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObtain theInstance
this resource is allocated to.getJobs()
Gets a list of jobs running on this resource in this instance.getPes()
Gets a list of processing elements running on this resource in this instance.Obtain theResource
object for detailed information on the resource.Identifies the REST resource typeStatus of the resource.Scheduler status of the resource.boolean
Indicates whether the resource is an application resource.Methods inherited from class com.teracloud.streams.rest.Element
getStreamsConnection, refresh, toString
-
Constructor Details
-
ResourceAllocation
public ResourceAllocation()
-
-
Method Details
-
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 otherwisefalse
.
-
getSchedulerStatus
Status of the resource. Some possible values for this property includefailed
,partiallyFailed
,partiallyRunning
,quiesced
,quiescing
,running
,restarting
,resuming
,starting
,stopped
, andunknown
.- Returns:
- Status of the resource.
-
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
Obtain theResource
object for detailed information on the resource.- Returns:
- Resource.
- Throws:
IOException
- Exception communicating with Streams instance.
-
getInstance
Obtain theInstance
this resource is allocated to.- Returns:
- Instance this resource is allocated to.
- Throws:
IOException
- Exception communicating with Streams instance.
-
getJobs
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
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.
-