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, RoundRobinScheduler

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  ArrayList<PhysicalMachine> orderedPMcache
           
protected  IaaSService parent
           
private  int pmCacheLen
           
static Comparator<PhysicalMachine> pmComparator
           
protected  PhysicalMachine.StateChangeListener pmstateChanged
           
protected  List<QueueingData> queue
           
private  ArrayList<Scheduler.QueueingEvent> queueListeners
           
protected  ResourceConstraints totalQueued
           
 
Constructor Summary
Scheduler(IaaSService parent)
           
 
Method Summary
 int getQueueLength()
           
 ResourceConstraints getTotalQueued()
           
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  void 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 ResourceConstraints totalQueued

orderedPMcache

private ArrayList<PhysicalMachine> orderedPMcache

pmCacheLen

private int pmCacheLen

queueListeners

private ArrayList<Scheduler.QueueingEvent> queueListeners

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

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()

scheduleQueued

protected abstract void scheduleQueued()


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