org.jboss.messaging.utils
Class TimeAndCounterIDGenerator
java.lang.Object
org.jboss.messaging.utils.TimeAndCounterIDGenerator
- All Implemented Interfaces:
- IDGenerator
public class TimeAndCounterIDGenerator
- extends java.lang.Object
- implements IDGenerator
A TimeAndCounterIDGenerator
This IDGenerator doesn't support more than 16777215 IDs per 16 millisecond. It would throw an exception if this happens.
- Author:
- Clebert Suconic, Tim Fox Created Sep 24, 2008 11:54:10 AM
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MASK_TIME
public static final long MASK_TIME
- See Also:
- Constant Field Values
ID_MASK
public static final long ID_MASK
- See Also:
- Constant Field Values
TimeAndCounterIDGenerator
public TimeAndCounterIDGenerator()
generateID
public long generateID()
- Specified by:
generateID
in interface IDGenerator
getCurrentID
public long getCurrentID()
- Specified by:
getCurrentID
in interface IDGenerator
getInternalTimeMark
public long getInternalTimeMark()
setInternalID
public void setInternalID(long id)
setInternalDate
public void setInternalDate(long date)
refresh
public void refresh()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2006 JBoss Inc. All Rights Reserved.