public interface ResourceQueryService
Modifier and Type | Method and Description |
---|---|
java.util.Set<Resource> |
getAvailableResources(DiscreteResourceId parent)
Returns resources that point available child resources under the specified resource.
|
<T> java.util.Set<Resource> |
getAvailableResources(DiscreteResourceId parent,
java.lang.Class<T> cls)
Returns available resources which are child resources of the specified parent and
whose type is the specified type.
|
<T> java.util.Set<T> |
getAvailableResourceValues(DiscreteResourceId parent,
java.lang.Class<T> cls)
Returns available resource values which are the values of the child resource of
the specified parent and whose type is the specified type.
|
java.util.Set<Resource> |
getRegisteredResources(DiscreteResourceId parent)
Returns resources registered under the specified resource.
|
<T> java.util.Collection<ResourceAllocation> |
getResourceAllocations(DiscreteResourceId parent,
java.lang.Class<T> cls)
Returns allocated resources being as children of the specified parent and being the specified resource type.
|
java.util.Collection<ResourceAllocation> |
getResourceAllocations(ResourceConsumer consumer)
Returns resources allocated to the specified consumer.
|
java.util.List<ResourceAllocation> |
getResourceAllocations(ResourceId id)
Returns resource allocations of the specified resource.
|
boolean |
isAvailable(Resource resource)
Returns the availability of the specified resource.
|
java.util.List<ResourceAllocation> getResourceAllocations(ResourceId id)
id
- ID of the resource to check the allocation<T> java.util.Collection<ResourceAllocation> getResourceAllocations(DiscreteResourceId parent, java.lang.Class<T> cls)
T
- type of the resourceparent
- parent resource IDcls
- class to specify a type of resourcejava.util.Collection<ResourceAllocation> getResourceAllocations(ResourceConsumer consumer)
consumer
- consumer whose allocated resources are to be returnedjava.util.Set<Resource> getAvailableResources(DiscreteResourceId parent)
parent
- parent resource ID<T> java.util.Set<Resource> getAvailableResources(DiscreteResourceId parent, java.lang.Class<T> cls)
T
- type of the resourceparent
- parent resource IDcls
- class to specify a type of resource<T> java.util.Set<T> getAvailableResourceValues(DiscreteResourceId parent, java.lang.Class<T> cls)
T
- type of the resourceparent
- parent resource IDcls
- class to specify a type of resourcejava.util.Set<Resource> getRegisteredResources(DiscreteResourceId parent)
parent
- parent resource IDboolean isAvailable(Resource resource)
resource
- resource to check the availability