org.terracotta.modules.ehcache.async.scatterpolicies
Interface ItemScatterPolicy<E extends Serializable>

All Known Implementing Classes:
HashCodeScatterPolicy, SingleBucketScatterPolicy

public interface ItemScatterPolicy<E extends Serializable>


Method Summary
 int selectBucket(int count, E item)
          Returns a bucket index in the range 0 to (count - 1) to which an item should be assigned.
 

Method Detail

selectBucket

int selectBucket(int count,
                 E item)
Returns a bucket index in the range 0 to (count - 1) to which an item should be assigned.

Parameters:
count - exclusive maximum index
item - the item we are scattering across the buckets
Returns:
bucket index to use


Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.