@Beta public class RadixCosIdGenerator extends java.lang.Object implements CosIdGenerator
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MACHINE_BIT |
static int |
DEFAULT_SEQUENCE_BIT |
static int |
DEFAULT_SEQUENCE_RESET_THRESHOLD |
static int |
DEFAULT_TIMESTAMP_BIT |
| Constructor and Description |
|---|
RadixCosIdGenerator(int timestampBit,
int machineIdBit,
int sequenceBit,
int machineId,
int sequenceResetThreshold,
CosIdIdStateParser stateParser) |
| Modifier and Type | Method and Description |
|---|---|
CosIdState |
generateAsState() |
java.lang.String |
generateAsString()
Generate string type distributed ID.
|
long |
getLastTimestamp() |
int |
getMachineId() |
CosIdIdStateParser |
getStateParser() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerate, idConverterpublic static final int DEFAULT_TIMESTAMP_BIT
public static final int DEFAULT_MACHINE_BIT
public static final int DEFAULT_SEQUENCE_BIT
public static final int DEFAULT_SEQUENCE_RESET_THRESHOLD
public RadixCosIdGenerator(int timestampBit,
int machineIdBit,
int sequenceBit,
int machineId,
int sequenceResetThreshold,
CosIdIdStateParser stateParser)
public int getMachineId()
getMachineId in interface CosIdGeneratorpublic long getLastTimestamp()
getLastTimestamp in interface CosIdGeneratorpublic CosIdIdStateParser getStateParser()
getStateParser in interface CosIdGeneratorpublic CosIdState generateAsState()
generateAsState in interface CosIdGeneratorpublic java.lang.String generateAsString()
StringIdGeneratorgenerateAsString in interface CosIdGeneratorgenerateAsString in interface IdGeneratorgenerateAsString in interface StringIdGenerator