Lightweight Bartering Grid

lbg.peer.strategy.scheduling.preemption
Class AdaptivePreemption

java.lang.Object
  extended by lbg.peer.strategy.scheduling.preemption.AdaptivePreemption
All Implemented Interfaces:
SupplyingRunningPreemptionPolicy
Direct Known Subclasses:
AdaptivePreemptionGrace1, AdaptivePreemptionGrace10, AdaptivePreemptionGrace2, AdaptivePreemptionGrace5

public class AdaptivePreemption
extends java.lang.Object
implements SupplyingRunningPreemptionPolicy

Adaptive Preemption.

Author:
Cyril Briquet

Constructor Summary
AdaptivePreemption(Peer managed_peer, Scheduler scheduler)
           
 
Method Summary
static long getGracePeriod()
           
 void preemptLocalResources(Task prioritary_task)
          SupplyingRunningPreemptionPolicy implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptivePreemption

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

preemptLocalResources

public void preemptLocalResources(Task prioritary_task)
                           throws GridException
SupplyingRunningPreemptionPolicy implementation. As a side effect, all waiting Supplying Tasks are cancelled.

Specified by:
preemptLocalResources in interface SupplyingRunningPreemptionPolicy
Throws:
GridException

getGracePeriod

public static long getGracePeriod()

Lightweight Bartering Grid

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