public abstract class MyUniqueID
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
_DEFAULTHASHMOD
The hash modulo number (58881877 )
|
static long |
HASHBITCOUNT
The bit count needed for registering a hash value
|
static long |
HASHSCALEMASK
The hash mask
|
static long |
TIMEBITCOUNT
The bit count needed for registering the time portion : 64 available, minus 8 for the sequence, minus one for any indicator we might ever want, minus the hash portion.
|
static long |
TIMESCALEMASK
The time mask
|
Modifier and Type | Method and Description |
---|---|
static long |
getSeq()
Gets a sequence
|
static long |
getUniqueID(java.nio.ByteBuffer byteBuffer)
Gets a unique internal id
|
static int |
hash(java.nio.ByteBuffer byteBuffer,
int hashMod)
Method to calculate a hash number.
|
public static final int _DEFAULTHASHMOD
public static final long HASHBITCOUNT
public static final long HASHSCALEMASK
public static final long TIMEBITCOUNT
public static final long TIMESCALEMASK
public static long getSeq()
public static long getUniqueID(java.nio.ByteBuffer byteBuffer)
byteBuffer
- the byte buffer representing the value for which a unique id is to be obtainedpublic static int hash(java.nio.ByteBuffer byteBuffer, int hashMod)
byteBuffer
- a ByteBuffer object holding the internal representation of the data to be hashed.hashMod
- -