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

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

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


Constructor Summary
SingleBucketScatterPolicy()
           
 
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

SingleBucketScatterPolicy

public SingleBucketScatterPolicy()
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.