Lightweight Bartering Grid

lbg.peer.strategy.scheduling.consumption
Class MTTCConsumptionScheduling

java.lang.Object
  extended by lbg.peer.strategy.scheduling.consumption.CommonConsumptionScheduling
      extended by lbg.peer.strategy.scheduling.consumption.MTTCConsumptionScheduling
All Implemented Interfaces:
ConsumptionSchedulingPolicy

public class MTTCConsumptionScheduling
extends CommonConsumptionScheduling
implements ConsumptionSchedulingPolicy

Consumption scheduling based on MTTC ranking.

Author:
Cyril Briquet

Constructor Summary
MTTCConsumptionScheduling(Peer managed_peer, Scheduler scheduler)
           
 
Method Summary
protected  LocalQueueCursor getLocalQueueCursor()
          Local Queue Cursor accessor.
protected  Ranking rankSuppliers(ConsumptionGrantsContainer c_g, RequestContainer rc)
          Rank Suppliers.
 java.lang.String toString()
           
 
Methods inherited from class lbg.peer.strategy.scheduling.consumption.CommonConsumptionScheduling
assertConsumptionGrantsAvailability, scheduleConsumptionTasks, scheduleFirstConsumptionTask, scheduleNextConsumptionTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface lbg.peer.strategy.scheduling.ConsumptionSchedulingPolicy
scheduleConsumptionTasks
 

Constructor Detail

MTTCConsumptionScheduling

public MTTCConsumptionScheduling(Peer managed_peer,
                                 Scheduler scheduler)
                          throws GridException
Throws:
GridException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class CommonConsumptionScheduling

rankSuppliers

protected Ranking rankSuppliers(ConsumptionGrantsContainer c_g,
                                RequestContainer rc)
                         throws GridException
Rank Suppliers.

Specified by:
rankSuppliers in class CommonConsumptionScheduling
Parameters:
c_g - collected Consumption Grants container
rc - target Task container
Returns:
Suppliers Ranking
Throws:
GridException - if a problem occured while ranking Suppliers

getLocalQueueCursor

protected LocalQueueCursor getLocalQueueCursor()
Local Queue Cursor accessor.

Specified by:
getLocalQueueCursor in class CommonConsumptionScheduling
Returns:
Local Queue Cursor, or null if none has been defined

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.