hu.mta.sztaki.lpds.cloud.simulator.iaas.vmscheduling
Class Scheduler

java.lang.Object
  extended by hu.mta.sztaki.lpds.cloud.simulator.iaas.vmscheduling.Scheduler
Direct Known Subclasses:
FirstFitScheduler

public abstract class Scheduler
extends Object

Author:
"Gabor Kecskemeti, Laboratory of Parallel and Distributed Systems, MTA SZTAKI (c) 2012"

Nested Class Summary
static interface Scheduler.QueueingEvent
           
 
Field Summary
protected  VMManager.CapacityChangeEvent<ResourceConstraints> freeCapacity
           
private  AlterableResourceConstraints freeResourcesSinceLastSchedule
           
private  ConstantConstraints minimumSchedulerRequirement
           
private  ArrayList<PhysicalMachine> orderedPMcache
           
protected  IaaSService parent
           
private  int pmCacheLen
           
static Comparator<PhysicalMachine> pmComparator
           
protected  PhysicalMachine.StateChangeListener pmstateChanged
           
protected  UnalterableConstraintsPropagator publicTQ
           
protected  List<QueueingData> queue
           
private  ArrayList<Scheduler.QueueingEvent> queueListeners
           
protected  AlterableResourceConstraints totalQueued
           
 
Constructor Summary
Scheduler(IaaSService parent)
           
 
Method Summary
 boolean dropVMrequest(VirtualMachine vm)
           
 List<VirtualMachine> getQueuedVMs()
           
 int getQueueLength()
           
 ResourceConstraints getTotalQueued()
           
private  void invokeRealScheduler()
           
protected  QueueingData manageQueueRemoval()
          Removes the head of the queue
protected  void manageQueueRemoval(QueueingData qd)
          Removes an arbitrary item from the queue
protected  void notifyListeners()
           
protected abstract  ConstantConstraints scheduleQueued()
           
 void scheduleVMrequest(VirtualMachine[] vms, ResourceConstraints rc, Repository vaSource, HashMap<String,Object> schedulingConstraints)
           
 void subscribeQueueingEvents(Scheduler.QueueingEvent e)
           
 void unsubscribeQueueingEvents(Scheduler.QueueingEvent e)
           
private  void updateTotalQueuedAfterRemoval(QueueingData qd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected final IaaSService parent

queue

protected List<QueueingData> queue

totalQueued

protected AlterableResourceConstraints totalQueued

publicTQ

protected UnalterableConstraintsPropagator publicTQ

orderedPMcache

private ArrayList<PhysicalMachine> orderedPMcache

pmCacheLen

private int pmCacheLen

queueListeners

private ArrayList<Scheduler.QueueingEvent> queueListeners

minimumSchedulerRequirement

private ConstantConstraints minimumSchedulerRequirement

freeResourcesSinceLastSchedule

private AlterableResourceConstraints freeResourcesSinceLastSchedule

pmComparator

public static final Comparator<PhysicalMachine> pmComparator

pmstateChanged

protected PhysicalMachine.StateChangeListener pmstateChanged

freeCapacity

protected VMManager.CapacityChangeEvent<ResourceConstraints> freeCapacity
Constructor Detail

Scheduler

public Scheduler(IaaSService parent)
Method Detail

scheduleVMrequest

public final void scheduleVMrequest(VirtualMachine[] vms,
                                    ResourceConstraints rc,
                                    Repository vaSource,
                                    HashMap<String,Object> schedulingConstraints)
                             throws VMManager.VMManagementException
Throws:
VMManager.VMManagementException

dropVMrequest

public final boolean dropVMrequest(VirtualMachine vm)

getTotalQueued

public ResourceConstraints getTotalQueued()

getQueueLength

public int getQueueLength()

manageQueueRemoval

protected void manageQueueRemoval(QueueingData qd)
Removes an arbitrary item from the queue

Parameters:
qd -

manageQueueRemoval

protected QueueingData manageQueueRemoval()
Removes the head of the queue


updateTotalQueuedAfterRemoval

private void updateTotalQueuedAfterRemoval(QueueingData qd)

subscribeQueueingEvents

public final void subscribeQueueingEvents(Scheduler.QueueingEvent e)

unsubscribeQueueingEvents

public final void unsubscribeQueueingEvents(Scheduler.QueueingEvent e)

notifyListeners

protected void notifyListeners()

getQueuedVMs

public final List<VirtualMachine> getQueuedVMs()

invokeRealScheduler

private void invokeRealScheduler()

scheduleQueued

protected abstract ConstantConstraints scheduleQueued()


Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.