InvocationsMonitor
public
final
class
InvocationsMonitor
extends Object
java.lang.Object | |
↳ | com.android.tradefed.invoker.monitor.InvocationsMonitor |
A monitor associated with the Tradefed instance in progress. This monitor is a singleton that monitors ALL invocations.
TODO: Complete tracking
Summary
Fields | |
---|---|
public
static
final
String |
INVOC_MONITOR_TYPE
|
Public methods | |
---|---|
static
InvocationsMonitor
|
getInstance()
Returns the instance of |
|
getInvocations()
Returns the Set of all the currently running invocation id. |
void
|
notifyLocalSharding(String id, int shardCount)
Notify of an invocation starting local sharding. |
void
|
trackInvocation(IInvocationContext context)
Start tracking an invocation by its id. |
void
|
untrackInvocation(IInvocationContext context)
Stop tracking a particular invocation id. |
Fields
INVOC_MONITOR_TYPE
public static final String INVOC_MONITOR_TYPE
Public methods
getInstance
public static InvocationsMonitor getInstance ()
Returns the instance of InvocationsMonitor
for the current running Tradefed.
Returns | |
---|---|
InvocationsMonitor |
getInvocations
publicgetInvocations ()
Returns the Set of all the currently running invocation id.
Returns | |
---|---|
|
notifyLocalSharding
public void notifyLocalSharding (String id, int shardCount)
Notify of an invocation starting local sharding. This is used to get an expectation of how many invocations we should see.
Parameters | |
---|---|
id |
String : The current invocation id. |
shardCount |
int : The shard count the invocation is getting sharded into.
|
trackInvocation
public void trackInvocation (IInvocationContext context)
Start tracking an invocation by its id. Sharded invocation have the same id but different invocation context, so we track each individual context for each shard.
Parameters | |
---|---|
context |
IInvocationContext : The IInvocationContext of the invocation that finished.
|
untrackInvocation
public void untrackInvocation (IInvocationContext context)
Stop tracking a particular invocation id. It must be done with all its shard at that point to be released.
Parameters | |
---|---|
context |
IInvocationContext : The IInvocationContext of the invocation that finished.
|