public class IdGenerator extends Object
| Modifier and Type | Field and Description | 
|---|---|
static String | 
PROPERTY_IDGENERATOR_HOSTNAME  | 
static String | 
PROPERTY_IDGENERATOR_LOCALPORT  | 
static String | 
PROPERTY_IDGENERATOR_PORT  | 
| Constructor and Description | 
|---|
IdGenerator()  | 
IdGenerator(String prefix)
Construct an IdGenerator 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static int | 
compare(String id1,
       String id2)
Does a proper compare on the ids 
 | 
String | 
generateId()
Generate a unique id 
 | 
String | 
generateSanitizedId()
Generate a unique ID - that is friendly for a URL or file system 
 | 
static String | 
getHostName()
As we have to find the hostname as a side-affect of generating a unique
 stub, we allow it's easy retrieval here 
 | 
static String | 
getSeedFromId(String id)
From a generated id - return the seed (i.e. 
 | 
static long | 
getSequenceFromId(String id)
From a generated id - return the generator count 
 | 
static String | 
sanitizeHostName(String hostName)  | 
public static final String PROPERTY_IDGENERATOR_HOSTNAME
public static final String PROPERTY_IDGENERATOR_LOCALPORT
public static final String PROPERTY_IDGENERATOR_PORT
public IdGenerator(String prefix)
public IdGenerator()
public static String getHostName()
public String generateId()
public static String sanitizeHostName(String hostName)
public String generateSanitizedId()
public static String getSeedFromId(String id)
id - the generated identiferpublic static long getSequenceFromId(String id)
id - Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.