Class IncrementingEnvironmentEdge

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

@Private public class IncrementingEnvironmentEdge extends Object implements EnvironmentEdge
Uses an incrementing algorithm instead of the default.
  • Field Details

  • Constructor Details

    • 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 Details

    • currentTime

      public long 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 interface EnvironmentEdge
      Returns:
      Current time.
    • incrementTime

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