org.terracotta.async
Interface StealPolicy<I>

Type Parameters:
I - item type
All Known Implementing Classes:
FallBehindStealPolicy, NeverStealPolicy

public interface StealPolicy<I>

Allows programmatic control of the conditions under which buckets may steal from other buckets.


Method Summary
 boolean shouldSteal(ProcessingBucket<I> victim, ProcessingBucket<I> thief)
          Returns true if the thief bucket can steal work items from the victim bucket.
 

Method Detail

shouldSteal

boolean shouldSteal(ProcessingBucket<I> victim,
                    ProcessingBucket<I> thief)
Returns true if the thief bucket can steal work items from the victim bucket.

Parameters:
victim - bucket being stolen from
thief - bucket doing the stealing
Returns:
true if stealing is permitted


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