org.apache.hadoop.hbase.util
Class EnvironmentEdgeManager

java.lang.Object
  extended by org.apache.hadoop.hbase.util.EnvironmentEdgeManager

@InterfaceAudience.Private
public class EnvironmentEdgeManager
extends Object

Manages a singleton instance of the environment edge. This class shall implement static versions of the interface EnvironmentEdge, then defer to the delegate on invocation.


Method Summary
static long currentTimeMillis()
          Defers to the delegate and calls the EnvironmentEdge.currentTimeMillis() method.
static EnvironmentEdge getDelegate()
          Retrieves the singleton instance of the EnvironmentEdge that is being managed.
static void injectEdge(EnvironmentEdge edge)
          Injects the given edge such that it becomes the managed entity.
static void reset()
          Resets the managed instance to the default instance: DefaultEnvironmentEdge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDelegate

public static EnvironmentEdge getDelegate()
Retrieves the singleton instance of the EnvironmentEdge that is being managed.

Returns:
the edge.

reset

public static void reset()
Resets the managed instance to the default instance: DefaultEnvironmentEdge.


injectEdge

public static void injectEdge(EnvironmentEdge edge)
Injects the given edge such that it becomes the managed entity. If null is passed to this method, the default type is assigned to the delegate.

Parameters:
edge - the new edge.

currentTimeMillis

public static long currentTimeMillis()
Defers to the delegate and calls the EnvironmentEdge.currentTimeMillis() method.

Returns:
current time in millis according to the delegate.


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.