Package org.cloudbus.cloudsim.resources
Interface Resourceful
- All Known Subinterfaces:
AbstractMachine
,Host
,Machine
,Vm
- All Known Implementing Classes:
HostSimple
,NetworkHost
,NetworkVm
,VmGroup
,VmSimple
public interface Resourceful
An interface to be implemented by a machine such as a
Host
or Vm
,
that provides a polymorphic way to access a given resource
like Ram
, Bandwidth
, Storage
or Pe
from a List containing such different resources.- Since:
- CloudSim Plus 1.0
- Author:
- Manoel Campos da Silva Filho
-
Method Summary
Modifier and Type Method Description default ResourceManageable
getResource(Class<? extends ResourceManageable> resourceClass)
Gets a givenAbstractMachine
Resource
, such asRam
orBandwidth
, from the List of machine resources.List<ResourceManageable>
getResources()
Gets a read-only list of resources the machine has.
-
Method Details
-
getResource
Gets a givenAbstractMachine
Resource
, such asRam
orBandwidth
, from the List of machine resources.- Parameters:
resourceClass
- the class of resource to get- Returns:
- the
Resource
corresponding to the given class
-
getResources
List<ResourceManageable> getResources()Gets a read-only list of resources the machine has.- Returns:
- a read-only list of resources
- See Also:
getResource(Class)
-