@ThreadSafe public class IntegerIdGenerator extends java.lang.Object implements StringIdGenerator
| Modifier and Type | Class and Description |
|---|---|
static class |
IntegerIdGenerator.IdOverflowException
ID Overflow Exception.
|
| Modifier and Type | Field and Description |
|---|---|
protected IdGenerator |
actual |
| Constructor and Description |
|---|
IntegerIdGenerator(IdGenerator actual) |
| Modifier and Type | Method and Description |
|---|---|
int |
generate()
Generate distributed ID of type int.
|
java.lang.String |
generateAsString()
Generate distributed ID of type string.
|
protected final IdGenerator actual
public IntegerIdGenerator(IdGenerator actual)
public int generate()
throws IntegerIdGenerator.IdOverflowException
IntegerIdGenerator.IdOverflowException - This exception is thrown when the ID overflowspublic java.lang.String generateAsString()
throws IntegerIdGenerator.IdOverflowException
generateAsString in interface StringIdGeneratorIntegerIdGenerator.IdOverflowException - This exception is thrown when the ID overflows