gr.uoa.di.madgik.execution.engine.queue
Class PlanQueueElement

java.lang.Object
  extended by gr.uoa.di.madgik.execution.engine.queue.PlanQueueElement

public class PlanQueueElement
extends Object

A queue element used to store a plan before it is executed. Plans are evaluated for requested resources and if not qualified to start executing they miss their turn and following plans are evaluated. Every queue element has a threshold of required utilization percentage and the number of allowed times it can miss turn.

Author:
john.gerbesiotis - DI NKUA

Constructor Summary
PlanQueueElement(float util, int ttl, gr.uoa.di.madgik.execution.engine.ExecutionHandle handle)
          Default constructor.
 
Method Summary
 boolean canGetDecreaseTtl()
          Decrease ttl value by one if it is positive
 boolean decreaseTtl()
          Decrease ttl value by one if it is positive
 gr.uoa.di.madgik.execution.engine.ExecutionHandle getHandle()
           
 int getTtl()
           
 float getUtil()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanQueueElement

public PlanQueueElement(float util,
                        int ttl,
                        gr.uoa.di.madgik.execution.engine.ExecutionHandle handle)
Default constructor.

Parameters:
util - Number of maximum concurrent execution jobs
ttl - Maximum number of missed turns
handle - Handler of execution plan
Method Detail

getUtil

public float getUtil()
Returns:
the util

getTtl

public int getTtl()
Returns:
the ttl

decreaseTtl

public boolean decreaseTtl()
Decrease ttl value by one if it is positive

Returns:
true if decreased otherwise false

canGetDecreaseTtl

public boolean canGetDecreaseTtl()
Decrease ttl value by one if it is positive

Returns:
true if decreased otherwise false

getHandle

public gr.uoa.di.madgik.execution.engine.ExecutionHandle getHandle()
Returns:
the handle


Copyright © 2013. All Rights Reserved.