org.terracotta.modules.async.stealpolicies
Class FallBehindStealPolicy<I>

java.lang.Object
  extended by org.terracotta.modules.async.stealpolicies.FallBehindStealPolicy<I>
All Implemented Interfaces:
StealPolicy<I>

public class FallBehindStealPolicy<I>
extends Object
implements StealPolicy<I>


Constructor Summary
FallBehindStealPolicy(long maxAllowedFallBehind)
           
 
Method Summary
 boolean shouldSteal(ProcessingBucket<I> victim, ProcessingBucket<I> thief)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FallBehindStealPolicy

public FallBehindStealPolicy(long maxAllowedFallBehind)
Parameters:
maxAllowedFallBehind - the amount of milliseconds that the victim is allowed to fall behind the thief before its work gets stolen
Method Detail

shouldSteal

public boolean shouldSteal(ProcessingBucket<I> victim,
                           ProcessingBucket<I> thief)
Specified by:
shouldSteal in interface StealPolicy<I>


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.