GridGain™ 2.0.3
Java API Specification

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.GRID_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.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

 

Constructor Summary
GridTestRouterAdapter()
           
 
Method Summary
 GridNode route(Class<?> test, String name, List<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,
                      List<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.GRID_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™ 2.0.3
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.