ShardHelper

public class ShardHelper
extends Object implements IShardHelper

java.lang.Object
   ↳ com.android.tradefed.invoker.shard.ShardHelper


Helper class that handles creating the shards and scheduling them for an invocation.

Summary

Public constructors

ShardHelper()

Public methods

void rescheduleConfig(IConfiguration shardConfig, IConfiguration config, IInvocationContext context, IRescheduler rescheduler, ShardMasterResultForwarder resultCollector)
boolean shardConfig(IConfiguration config, IInvocationContext context, IRescheduler rescheduler)

Attempt to shard the configuration into sub-configurations, to be re-scheduled to run on multiple resources in parallel.

Protected methods

IGlobalConfiguration getGlobalConfiguration()

Returns the current global configuration.

Public constructors

ShardHelper

public ShardHelper ()

Public methods

rescheduleConfig

public void rescheduleConfig (IConfiguration shardConfig, 
                IConfiguration config, 
                IInvocationContext context, 
                IRescheduler rescheduler, 
                ShardMasterResultForwarder resultCollector)

Parameters
shardConfig IConfiguration

config IConfiguration

context IInvocationContext

rescheduler IRescheduler

resultCollector ShardMasterResultForwarder

shardConfig

public boolean shardConfig (IConfiguration config, 
                IInvocationContext context, 
                IRescheduler rescheduler)

Attempt to shard the configuration into sub-configurations, to be re-scheduled to run on multiple resources in parallel.

A successful shard action renders the current config empty, and invocation should not proceed.

Parameters
config IConfiguration: the current IConfiguration.

context IInvocationContext: the IInvocationContext holding the tests information.

rescheduler IRescheduler: the IRescheduler

Returns
boolean true if test was sharded. Otherwise return false

Protected methods

getGlobalConfiguration

protected IGlobalConfiguration getGlobalConfiguration ()

Returns the current global configuration.

Returns
IGlobalConfiguration