org.apache.hadoop.hbase.util
Class IncrementingEnvironmentEdge

java.lang.Object
  extended by org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge
All Implemented Interfaces:
EnvironmentEdge

@InterfaceAudience.Private
public class IncrementingEnvironmentEdge
extends Object
implements EnvironmentEdge

Uses an incrementing algorithm instead of the default.


Constructor Summary
IncrementingEnvironmentEdge()
          Construct an incremental edge starting from currentTimeMillis
IncrementingEnvironmentEdge(long initialAmount)
          Construct an incremental edge with an initial amount
 
Method Summary
 long currentTimeMillis()
          Returns the currentTimeMillis.
 long incrementTime(long amount)
          Increment the time by the given amount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncrementingEnvironmentEdge

public IncrementingEnvironmentEdge()
Construct an incremental edge starting from currentTimeMillis


IncrementingEnvironmentEdge

public IncrementingEnvironmentEdge(long initialAmount)
Construct an incremental edge with an initial amount

Parameters:
initialAmount - the initial value to start with
Method Detail

currentTimeMillis

public long currentTimeMillis()
Returns the currentTimeMillis.

This method increments a known value for the current time each time this method is called. The first value is 1.

Specified by:
currentTimeMillis in interface EnvironmentEdge
Returns:
currentTimeMillis.

incrementTime

public long incrementTime(long amount)
Increment the time by the given amount



Copyright © 2015 The Apache Software Foundation. All Rights Reserved.