backtype.storm.utils
Class RegisteredGlobalState

java.lang.Object
  extended by backtype.storm.utils.RegisteredGlobalState

public class RegisteredGlobalState
extends java.lang.Object

This class is used as part of testing Storm. It is used to keep track of "global metrics" in an atomic way. For example, it is used for doing fine-grained detection of when a local Storm cluster is idle by tracking the number of transferred tuples vs the number of processed tuples.


Constructor Summary
RegisteredGlobalState()
           
 
Method Summary
static void clearState(java.lang.String id)
           
static java.lang.Object getState(java.lang.String id)
           
static java.lang.Object globalLock()
           
static java.lang.String registerState(java.lang.Object init)
           
static void setState(java.lang.String id, java.lang.Object init)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisteredGlobalState

public RegisteredGlobalState()
Method Detail

globalLock

public static java.lang.Object globalLock()

registerState

public static java.lang.String registerState(java.lang.Object init)

setState

public static void setState(java.lang.String id,
                            java.lang.Object init)

getState

public static java.lang.Object getState(java.lang.String id)

clearState

public static void clearState(java.lang.String id)