InvocationTracker

public final class InvocationTracker
extends Object

java.lang.Object
   ↳ com.android.tradefed.invoker.monitor.InvocationTracker


Information stored for a particular invocation (parent and all its shards).

Summary

Public constructors

InvocationTracker(IInvocationContext context)

Ctor for the initial creation of the information holder.

Public methods

void addInvocationTracking(IInvocationContext context)

Start tracking an IInvocationContext.

String getInvocationId()

Returns the invocation id tracked by the InvocationTracker.

boolean hasInvocation(IInvocationContext context)

Whether or not the InvocationTracker is tracking a particular IInvocationContext of an invocation.

void invocationDone(IInvocationContext context)

Notify that an invocation associated with a IInvocationContext is done running.

boolean isAllDone()

Returns True if all the tracked invocation are done (parent and potential shards).

void notifySharding(int shardCount)

Notify that the invocation tracked is being sharded.

Public constructors

InvocationTracker

public InvocationTracker (IInvocationContext context)

Ctor for the initial creation of the information holder.

Public methods

addInvocationTracking

public void addInvocationTracking (IInvocationContext context)

Start tracking an IInvocationContext.

Parameters
context IInvocationContext

getInvocationId

public String getInvocationId ()

Returns the invocation id tracked by the InvocationTracker.

Returns
String

hasInvocation

public boolean hasInvocation (IInvocationContext context)

Whether or not the InvocationTracker is tracking a particular IInvocationContext of an invocation.

Parameters
context IInvocationContext: The IInvocationContext that we are checking

Returns
boolean True if the IInvocationContext is tracked.

invocationDone

public void invocationDone (IInvocationContext context)

Notify that an invocation associated with a IInvocationContext is done running.

Parameters
context IInvocationContext

isAllDone

public boolean isAllDone ()

Returns True if all the tracked invocation are done (parent and potential shards). returns False otherwise.

Returns
boolean

notifySharding

public void notifySharding (int shardCount)

Notify that the invocation tracked is being sharded.

Parameters
shardCount int: The number of shards an invocation is expected to be sharded into.