ClusterCommandScheduler

public class ClusterCommandScheduler
extends CommandScheduler

java.lang.Object
   ↳ com.android.tradefed.command.CommandScheduler
     ↳ com.android.tradefed.cluster.ClusterCommandScheduler


A ICommandScheduler to support TFC (Tradefed Cluster). This scheduler runs commands from TFC command-queue and uploads invocation events to TFC command-event-queue.

Summary

Public constructors

ClusterCommandScheduler()

Public methods

void shutdown()

Attempt to gracefully shutdown the command scheduler.

void shutdownHard()

Attempt to forcefully shutdown the command scheduler.

void start()

Starts the scheduler including setting up of logging, init of DeviceManager etc

Protected methods

boolean dryRunCommand(com.android.tradefed.cluster.ClusterCommandScheduler.InvocationEventHandler handler, String[] args)

Determines if a given command is a dry-run.

void processReadyCommands(IDeviceManager manager)

Public constructors

ClusterCommandScheduler

public ClusterCommandScheduler ()

Public methods

shutdown

public void shutdown ()

Attempt to gracefully shutdown the command scheduler.

Clears commands waiting to be tested, and requests that all invocations in progress shut down gracefully.

After shutdown is called, the scheduler main loop will wait for all invocations in progress to complete before exiting completely.

shutdownHard

public void shutdownHard ()

Attempt to forcefully shutdown the command scheduler. Same as shutdownHard(true).

start

public void start ()

Starts the scheduler including setting up of logging, init of DeviceManager etc

Protected methods

dryRunCommand

protected boolean dryRunCommand (com.android.tradefed.cluster.ClusterCommandScheduler.InvocationEventHandler handler, 
                String[] args)

Determines if a given command is a dry-run. If the command is a dry-run, validate it. If there are any configs issue, it will throw a ConfigurationException.

Parameters
handler com.android.tradefed.cluster.ClusterCommandScheduler.InvocationEventHandler: InvocationEventHandler to report events for dry-run validation.

args String: the command to validate.

Returns
boolean true if the command are a dry run, false otherwise.

Throws
ConfigurationException

processReadyCommands

protected void processReadyCommands (IDeviceManager manager)

Parameters
manager IDeviceManager