public class

StateTransitionTableBuilder

extends Object
java.lang.Object
   ↳ org.apache.helix.model.builder.StateTransitionTableBuilder

Summary

Public Constructors
StateTransitionTableBuilder()
Public Methods
Map<StringMap<StringString>> buildTransitionTable(List<String> states, List<Transition> transitions)
Uses floyd-warshall algorithm, shortest distance for all pair of nodes Allows one to lookup nextState given fromState,toState
map.get(fromState).get(toState) --> nextState
static String getNext(Map<StringMap<StringString>> next, String fromState, String toState)
auxiliary method to get next state based on next map
static void main(String[] args)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StateTransitionTableBuilder ()

Public Methods

public Map<StringMap<StringString>> buildTransitionTable (List<String> states, List<Transition> transitions)

Uses floyd-warshall algorithm, shortest distance for all pair of nodes Allows one to lookup nextState given fromState,toState
map.get(fromState).get(toState) --> nextState

Returns
  • next map

public static String getNext (Map<StringMap<StringString>> next, String fromState, String toState)

auxiliary method to get next state based on next map

Returns
  • nextState or null if doesn't exist a path

public static void main (String[] args)