Package org.cloudsimplus.listeners
Interface CloudletResourceAllocationFailEventInfo
- All Superinterfaces:
CloudletEventInfo
,EventInfo
public interface CloudletResourceAllocationFailEventInfo extends CloudletEventInfo
An interface that represents data to be passed
to
EventListener
objects that are registered to be notified
when a CloudletScheduler
is not able to allocated the amount of resource a Cloudlet
is requesting due to lack of available capacity.- Since:
- CloudSim Plus 5.4.3
- Author:
- Manoel Campos da Silva Filho
-
Method Summary
Modifier and Type Method Description long
getAvailableAmount()
The amount of resource amount that was available before allocating for the Cloudlet.EventListener<CloudletResourceAllocationFailEventInfo>
getListener()
Gets the listener that was notified about the event.long
getRequestedAmount()
The amount of resources which is being requested and which is not currently available.Class<? extends ResourceManageable>
getResourceClass()
The the class of the resource the Cloudlet is requesting.static CloudletResourceAllocationFailEventInfo
of(EventListener<CloudletResourceAllocationFailEventInfo> listener, Cloudlet cloudlet, Class<? extends ResourceManageable> resourceClass, long requestedAmount, long availableAmount, double time)
Gets a EventInfo instance from the given parameters.Methods inherited from interface org.cloudsimplus.listeners.CloudletEventInfo
getCloudlet
-
Method Details
-
getResourceClass
Class<? extends ResourceManageable> getResourceClass()The the class of the resource the Cloudlet is requesting.- Returns:
-
getRequestedAmount
long getRequestedAmount()The amount of resources which is being requested and which is not currently available. The unit depends on the type of thegetResourceClass()
resource}.- Returns:
-
getAvailableAmount
long getAvailableAmount()The amount of resource amount that was available before allocating for the Cloudlet. The unit depends on the type of thegetResourceClass()
resource}.- Returns:
-
getListener
EventListener<CloudletResourceAllocationFailEventInfo> getListener()Description copied from interface:EventInfo
Gets the listener that was notified about the event.- Specified by:
getListener
in interfaceEventInfo
- Returns:
-
of
static CloudletResourceAllocationFailEventInfo of(EventListener<CloudletResourceAllocationFailEventInfo> listener, Cloudlet cloudlet, Class<? extends ResourceManageable> resourceClass, long requestedAmount, long availableAmount, double time)Gets a EventInfo instance from the given parameters.- Parameters:
listener
- the listener to be notified about the eventcloudlet
- the Cloudlet requesting the resourceresourceClass
- the class of the resource the Cloudlet is requestingrequestedAmount
- the requested resource amount (the unit depends on the resource requested)availableAmount
- the amount of resource amount that was available before allocating for the Cloudlet (the unit depends on the resource requested)time
- the time the event happened- Returns:
-