org.omnaest.utils.time
Class DurationCaptureCallableDecorator<V>

java.lang.Object
  extended by org.omnaest.utils.time.DurationCaptureCallableDecorator<V>
All Implemented Interfaces:
Callable<V>

public class DurationCaptureCallableDecorator<V>
extends Object
implements Callable<V>

Callable decorator which captures the duration of the Callable.call() method

Author:
Omnaest
See Also:
getDurationCapture()

Field Summary
protected  Callable<V> callable
           
protected  DurationCapture durationCapture
           
 
Constructor Summary
DurationCaptureCallableDecorator(Callable<V> callable)
           
 
Method Summary
 V call()
           
 DurationCapture getDurationCapture()
           
 long getDurationInMilliseconds()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

durationCapture

protected DurationCapture durationCapture

callable

protected Callable<V> callable
Constructor Detail

DurationCaptureCallableDecorator

public DurationCaptureCallableDecorator(Callable<V> callable)
Method Detail

call

public V call()
       throws Exception
Specified by:
call in interface Callable<V>
Throws:
Exception

getDurationInMilliseconds

public long getDurationInMilliseconds()

getDurationCapture

public DurationCapture getDurationCapture()


Copyright © 2013. All Rights Reserved.