org.jwarp.service.threadpool
Class RunStats

java.lang.Object
  |
  +--org.jwarp.service.threadpool.RunStats

public class RunStats
extends java.lang.Object

Class implementing the run statistics interface and some additoinal helper methods.

Version:
1.0
Author:
Anatole Tresch

Field Summary
(package private)  long end
          The end time in ms
(package private)  java.lang.Exception exception
          The exception (if occurred)
(package private)  java.lang.Object result
          The run result.
(package private)  long start
          The start time in ms
 
Constructor Summary
RunStats()
          Creates a new run stats object.
 
Method Summary
 void end(java.lang.Exception e)
          Finishing the run stats for a unsuccessful execution.
 void end(java.lang.Object result)
          Finishing the run stats for a successful execution.
 long getEnd()
          Return the end time in ms.
 java.lang.Exception getException()
          Return the exception (if any).
 java.lang.Object getResult()
          Return the result.
 long getStart()
          Return the start time in ms.
 long getTime()
          Return the execution time in ms.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

long start
The start time in ms

end

long end
The end time in ms

result

java.lang.Object result
The run result.

exception

java.lang.Exception exception
The exception (if occurred)
Constructor Detail

RunStats

public RunStats()
Creates a new run stats object.
Method Detail

end

public void end(java.lang.Exception e)
Finishing the run stats for a unsuccessful execution.
Parameters:
e - The exception

end

public void end(java.lang.Object result)
Finishing the run stats for a successful execution.
Parameters:
result - The result (string)

getStart

public long getStart()
Return the start time in ms.
Returns:
The start time in ms

getEnd

public long getEnd()
Return the end time in ms.
Returns:
The end time in ms

getTime

public long getTime()
Return the execution time in ms.
Returns:
The execution time in ms

getResult

public java.lang.Object getResult()
Return the result.
Returns:
The result.

getException

public java.lang.Exception getException()
Return the exception (if any).
Returns:
The exception.

©   O R C A   S y s t e m s