
org.terracotta.modules.ehcache.async.scatterpolicies.HashCodeScatterPolicy Maven / Gradle / Ivy
/*
* All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*/
package org.terracotta.modules.ehcache.async.scatterpolicies;
import java.io.Serializable;
public class HashCodeScatterPolicy implements ItemScatterPolicy {
public int selectBucket(final int count, final E item) {
return Math.abs(item.hashCode() % count);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy