GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid.test
Class GridTestRouterAdapter

java.lang.Object
  extended by org.gridgain.grid.test.GridTestRouterAdapter
All Implemented Interfaces:
GridTestRouter

public class GridTestRouterAdapter
extends Object
implements GridTestRouter

Round-Robin implementation of GridTestRouter interface. The implementation makes sure that nodes are assigned to tests sequentially, one after another.

Note that if GridTestVmParameters.GRIDGAIN_ROUTER_PREFER_REMOTE VM parameter is set to true, then tests will be routed to remote nodes assuming there are any. If there are no remote nodes, tests will be routed to local node.

Wiki & Forum:


Wiki
Forum

 

Constructor Summary
GridTestRouterAdapter()
           
 
Method Summary
 GridNode route(Class<?> test, String name, Collection<GridNode> subgrid, UUID locNodeId)
          Routes a test to a specific node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridTestRouterAdapter

public GridTestRouterAdapter()
Method Detail

route

public GridNode route(Class<?> test,
                      String name,
                      Collection<GridNode> subgrid,
                      UUID locNodeId)
Routes a test to a specific node. This method is provided so subclasses could specify their own logic for routing tests. It should be useful when some test can only be run on a specific node or on a specific set of nodes.

By default tests are routed to grid nodes in round-robin fashion. Set GridTestVmParameters.GRIDGAIN_ROUTER_PREFER_REMOTE VM parameter to true to always route tests to remote nodes, assuming there are any. If there are no remote nodes, then tests will still execute locally even if this VM parameter is set.

Specified by:
route in interface GridTestRouter
Parameters:
test - Test class.
name - Test name.
subgrid - List of available grid nodes.
locNodeId - Local node ID.
Returns:
Node this test should execute on.

GridGain™ 3.6.0e
Enterprise Edition

GridGain - Real Time Big Data
Enterprise Edition, ver. 3.6.0e.13012012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Follow GridGain on Facebook Join GridGain User Group Follow GridGain on Twitter Follow GridGain on YouTube