|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.util.HybridTimestampFactory
public class HybridTimestampFactory
A timestamp factory using System.currentTimeMillis() and an internal
counter to provide unique timestamps with greater than millisecond
resolution.
| Field Summary | |
|---|---|
static org.apache.log4j.Logger |
log
Deprecated. Logger. |
| Constructor Summary | |
|---|---|
protected |
HybridTimestampFactory()
Deprecated. Allows up to 1024 distinct timestamps per millisecond. |
|
HybridTimestampFactory(int counterBits)
Deprecated. Allows up to 2^counterBits distinct timestamps per
millisecond. |
| Method Summary | |
|---|---|
long |
getSleepCounter()
Deprecated. The #of times the factory needed to sleep the current thread in order to generate a distinct timestamp. |
long |
nextTimestamp()
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger log
| Constructor Detail |
|---|
protected HybridTimestampFactory()
public HybridTimestampFactory(int counterBits)
2^counterBits distinct timestamps per
millisecond.
counterBits - The #of bits in the long timestamp that are used to represent
a counter.| Method Detail |
|---|
public long getSleepCounter()
public long nextTimestamp()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||