All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lumongo.util.SegmentUtil Maven / Gradle / Ivy

There is a newer version: 0.52
Show newest version
package org.lumongo.util;

public class SegmentUtil {
	public static int findSegmentForUniqueId(String uniqueId, int numSegments) {
		int segmentNumber = Math.abs(uniqueId.hashCode()) % numSegments;
		return segmentNumber;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy