org.terracotta.modules.ehcache.async.scatterpolicies
Class HashCodeScatterPolicy<E extends Serializable>

java.lang.Object
  extended by org.terracotta.modules.ehcache.async.scatterpolicies.HashCodeScatterPolicy<E>
All Implemented Interfaces:
ItemScatterPolicy<E>

public class HashCodeScatterPolicy<E extends Serializable>
extends Object
implements ItemScatterPolicy<E>


Constructor Summary
HashCodeScatterPolicy()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashCodeScatterPolicy

public HashCodeScatterPolicy()
Method Detail

selectBucket

public int selectBucket(int count,
                        E item)
Description copied from interface: ItemScatterPolicy
Returns a bucket index in the range 0 to (count - 1) to which an item should be assigned.

Specified by:
selectBucket in interface ItemScatterPolicy<E extends Serializable>
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.