Class TimeAndCounterIDGenerator
java.lang.Object
org.apache.activemq.artemis.utils.TimeAndCounterIDGenerator
- All Implemented Interfaces:
IDGenerator
A TimeAndCounterIDGenerator
This IDGenerator doesn't support more than 16777215 IDs per 16 millisecond. It would throw an exception if this happens.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglonglongvoidrefresh()voidsetInternalDate(long date) voidsetInternalID(long id) toString()
-
Field Details
-
MASK_TIME
public static final long MASK_TIME- See Also:
-
ID_MASK
public static final long ID_MASK- See Also:
-
-
Constructor Details
-
TimeAndCounterIDGenerator
public TimeAndCounterIDGenerator()
-
-
Method Details
-
generateID
public long generateID()- Specified by:
generateIDin interfaceIDGenerator
-
getCurrentID
public long getCurrentID()- Specified by:
getCurrentIDin interfaceIDGenerator
-
getInternalTimeMark
public long getInternalTimeMark() -
setInternalID
public void setInternalID(long id) -
setInternalDate
public void setInternalDate(long date) -
refresh
public void refresh() -
toString
-