public class IdGenerator extends Object
| Constructor and Description |
|---|
IdGenerator()
Construct an IdGenerator
|
IdGenerator(String seed)
Construct an IdGenerator using the seed provided
|
| Modifier and Type | Method and Description |
|---|---|
String |
generateId()
Generate a unqiue id
|
String |
generateShortId()
Generate a unqiue short id that is 20 characters long
|
static String |
getHostName()
As we have to find the hostname as a side-affect of generating a unique stub, we allow it's easy retrevial here
|
static String |
getLocalIP() |
long |
getNextSequence() |
short |
getNextShortSequence() |
String |
getSeed() |
public IdGenerator()
public IdGenerator(String seed)
seed - parameterpublic static String getLocalIP()
public static String getHostName()
public String generateId()
public String generateShortId()
public String getSeed()
public long getNextSequence()
public short getNextShortSequence()
Copyright 2004-2021 Solace Corporation. All rights reserved.