public class TimeAndCounterIDGenerator extends Object implements IDGenerator
This IDGenerator doesn't support more than 16777215 IDs per 16 millisecond. It would throw an exception if this happens.
| Modifier and Type | Field and Description |
|---|---|
static long |
ID_MASK |
static long |
MASK_TIME |
| Constructor and Description |
|---|
TimeAndCounterIDGenerator() |
| Modifier and Type | Method and Description |
|---|---|
long |
generateID() |
long |
getCurrentID() |
long |
getInternalTimeMark() |
void |
refresh() |
void |
setInternalDate(long date) |
void |
setInternalID(long id) |
String |
toString() |
public static final long MASK_TIME
public static final long ID_MASK
public long generateID()
generateID in interface IDGeneratorpublic long getCurrentID()
getCurrentID in interface IDGeneratorpublic long getInternalTimeMark()
public void setInternalID(long id)
public void setInternalDate(long date)
public void refresh()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.