|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ConsumptionEventAdapter
public class ConsumptionEventAdapter
This class simplifies the implementation of consumption events and provides basic functions to determine if a resource consumption has already been completed (either with a failure or success). The simplification allows the following: Instead of implementing the complete consumption event interface, one can only concentrate on actions to do on success/failure only.
Field Summary | |
---|---|
private boolean |
cancelled
shows if the resource consumption has failed to complete for some reason |
private boolean |
completed
shows if the resource consumption has successfully completed |
Constructor Summary | |
---|---|
ConsumptionEventAdapter()
|
Method Summary | |
---|---|
void |
conCancelled(ResourceConsumption problematic)
This function simply marks the failure of the consumption in the cancelled field of the class. |
void |
conComplete()
This function simply marks the success of the consumption in the completed field of the class. |
boolean |
isCancelled()
Determines whether there was a failure in the resource consumption this event adapter is/was observing |
boolean |
isCompleted()
Determines if successful completion was marked for the resource consumption this event adapter is/was observing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean cancelled
private boolean completed
Constructor Detail |
---|
public ConsumptionEventAdapter()
Method Detail |
---|
public void conComplete()
conComplete
in interface ResourceConsumption.ConsumptionEvent
public void conCancelled(ResourceConsumption problematic)
conCancelled
in interface ResourceConsumption.ConsumptionEvent
public boolean isCancelled()
public boolean isCompleted()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |