com.bigdata.util
Class HybridTimestampFactory

java.lang.Object
  extended by com.bigdata.util.HybridTimestampFactory

Deprecated. This class has not been fully debugged and SHOULD NOT be used.

public class HybridTimestampFactory
extends Object

A timestamp factory using System.currentTimeMillis() and an internal counter to provide unique timestamps with greater than millisecond resolution.

Version:
$Id: HybridTimestampFactory.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

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

log

public static final org.apache.log4j.Logger log
Deprecated. 
Logger.

Constructor Detail

HybridTimestampFactory

protected HybridTimestampFactory()
Deprecated. 
Allows up to 1024 distinct timestamps per millisecond.


HybridTimestampFactory

public HybridTimestampFactory(int counterBits)
Deprecated. 
Allows up to 2^counterBits distinct timestamps per millisecond.

Parameters:
counterBits - The #of bits in the long timestamp that are used to represent a counter.
TODO:
Compute the maximum period after which the timestamps will overflow., Set the epoch when the timestamp factory is created and persist that epoch so that overflow is set the maximum #of milliseconds into the future. Note that overflow will be the point after which we can no longer generate timestamps (aka transaction identifiers) for a given database.
Method Detail

getSleepCounter

public long getSleepCounter()
Deprecated. 
The #of times the factory needed to sleep the current thread in order to generate a distinct timestamp.


nextTimestamp

public long nextTimestamp()
Deprecated. 


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.