public class Work extends Object
Used to maintains some useful times about the Runnable in terms of when it was queued and then eventually run.
| Constructor and Description |
|---|
Work(Runnable runnable)
Create a Runnable Work.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Return a description of this work.
|
long |
getEnterQueueTime()
Return the time this entered the queue.
|
long |
getExitQueueTime()
Return the time this left the queue.
|
Runnable |
getRunnable()
Return the associated Runnable object.
|
long |
getStartTime()
Return the time this work actually started.
|
void |
setEnterQueueTime(long enterQueueTime)
Set the time this entered the queue.
|
void |
setExitQueueTime(long exitQueueTime)
Set the time this work left the queue.
|
void |
setStartTime(long startTime)
Sets the time this work actually started.
|
String |
toString()
The same as getDescription().
|
public Work(Runnable runnable)
public Runnable getRunnable()
public long getStartTime()
public void setStartTime(long startTime)
public long getEnterQueueTime()
public void setEnterQueueTime(long enterQueueTime)
public long getExitQueueTime()
public void setExitQueueTime(long exitQueueTime)
public String getDescription()
Copyright © 2014. All Rights Reserved.