Package org.apache.hadoop.hbase.util
Class IncrementingEnvironmentEdge
java.lang.Object
org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge
- All Implemented Interfaces:
EnvironmentEdge
Uses an incrementing algorithm instead of the default.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstruct an incremental edge starting from currentTimeMillisIncrementingEnvironmentEdge
(long initialAmount) Construct an incremental edge with an initial amount -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the currentTime.long
incrementTime
(long amount) Increment the time by the given amount
-
Field Details
-
timeIncrement
-
-
Constructor Details
-
IncrementingEnvironmentEdge
public IncrementingEnvironmentEdge()Construct an incremental edge starting from currentTimeMillis -
IncrementingEnvironmentEdge
Construct an incremental edge with an initial amount- Parameters:
initialAmount
- the initial value to start with
-
-
Method Details
-
currentTime
Returns the currentTime.This method increments a known value for the current time each time this method is called. The first value is 1.
- Specified by:
currentTime
in interfaceEnvironmentEdge
- Returns:
- Current time.
-
incrementTime
Increment the time by the given amount
-