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

webpiecesxxxxxpackage.basesvr.RandomInstanceId Maven / Gradle / Ivy

Go to download

Someone forgot to fill this in. See http://stackoverflow.com/questions/38272550/how-to-fail-the-gradle-build-if-subproject-is-missing-a-property

There is a newer version: 2.1.28
Show newest version
package webpiecesxxxxxpackage.basesvr;

import org.apache.commons.lang3.RandomStringUtils;

public class RandomInstanceId {

	public static String generate() {
		String instanceId = RandomStringUtils.randomAlphanumeric(6);
		String s1 = instanceId.substring(0, 3);
		String s2 = instanceId.substring(3, 6);
		return s1+"-"+s2; //human readable instance id
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy