Top Fields Constructors Methods
org.testng.internal.thread.graph

pack-priv Class PhoneyWorker<T>

extends Object
implements IWorker<T>
Class Inheritance
All Implemented Interfaces
org.testng.thread.IWorker, java.lang.Comparable, java.lang.Runnable
Imports
java.util.List, javax.annotation.Nonnull, org.testng.thread.IWorker

Field Summary

Modifier and TypeField and Description
private final long

Constructor Summary

AccessConstructor and Description
public
PhoneyWorker(long threadId)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(IWorker<T>
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public int
public List<T>
public long
public long
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

threadIdback to summary
private final long threadId

Constructor Detail

PhoneyWorkerback to summary
public PhoneyWorker(long threadId)

Method Detail

compareToback to summary
public int compareTo(IWorker<T> o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:IWorker<T>

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getPriorityback to summary
public int getPriority()

Implements org.testng.thread.IWorker.getPriority.

Returns:int

Doc from org.testng.thread.IWorker.getPriority.

the priority of this task.

Annotations
@Override
getTasksback to summary
public List<T> getTasks()

Implements org.testng.thread.IWorker.getTasks.

Returns:List<T>

Doc from org.testng.thread.IWorker.getTasks.

list of tasks this worker is working on.

Annotations
@Override
getThreadIdToRunOnback to summary
public long getThreadIdToRunOn()

Overrides default org.testng.thread.IWorker.getThreadIdToRunOn.

Annotations
@Override
getTimeOutback to summary
public long getTimeOut()

Implements org.testng.thread.IWorker.getTimeOut.

Returns:long

Doc from org.testng.thread.IWorker.getTimeOut.

the maximum time allowed for the worker to complete the task.

Annotations
@Override
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override