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.
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 fromthief - bucket doing the stealing
- Returns:
true if stealing is permitted
Copyright © 2015 Terracotta, Inc.. All Rights Reserved.