Interface CloudletResourceAllocationFailEventInfo
- All Superinterfaces:
CloudletEventInfo,EventInfo
An interface that represents data to be passed
to
EventListener objects that are registered to be notified
when a CloudletScheduler is not able to allocate 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 TypeMethodDescriptionlongReturns amount of resource amount that was available before allocating for the Cloudlet.longReturns amount of resources being requested and which is not currently available.Class<? extends ResourceManageable> of(EventListener<CloudletResourceAllocationFailEventInfo> listener, Cloudlet cloudlet, Class<? extends ResourceManageable> resourceClass, long requestedAmount, long availableAmount, double time) Gets aEventInfoinstance from the given parameters.Methods inherited from interface org.cloudsimplus.listeners.CloudletEventInfo
getCloudlet
-
Method Details
-
getResourceClass
Class<? extends ResourceManageable> getResourceClass()- Returns:
- the class of the resource the Cloudlet is requesting.
-
getRequestedAmount
long getRequestedAmount()Returns amount of resources being requested and which is not currently available. The unit depends on the type of thegetResourceClass()resource.- Returns:
- amount of resources being requested and which is not currently available
-
getAvailableAmount
long getAvailableAmount()Returns amount of resource amount that was available before allocating for the Cloudlet. The unit depends on the type of thegetResourceClass()resource.- Returns:
- amount of resource amount that was available before allocating for the Cloudlet
-
getListener
EventListener<CloudletResourceAllocationFailEventInfo> getListener()- Specified by:
getListenerin interfaceEventInfo- Returns:
- the listener that was notified about the event.
-
of
static CloudletResourceAllocationFailEventInfo of(EventListener<CloudletResourceAllocationFailEventInfo> listener, Cloudlet cloudlet, Class<? extends ResourceManageable> resourceClass, long requestedAmount, long availableAmount, double time) Gets aEventInfoinstance 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
-