com.alipay.remoting.util
Class RunStateRecordedFutureTask<V>

java.lang.Object
  extended by java.util.concurrent.FutureTask<V>
      extended by com.alipay.remoting.util.RunStateRecordedFutureTask<V>
All Implemented Interfaces:
Runnable, Future<V>, RunnableFuture<V>

public class RunStateRecordedFutureTask<V>
extends FutureTask<V>

A customized FutureTask which can record whether the run method has been called.


Constructor Summary
RunStateRecordedFutureTask(Callable<V> callable)
           
 
Method Summary
 V getAfterRun()
           
 void run()
           
 
Methods inherited from class java.util.concurrent.FutureTask
cancel, done, get, get, isCancelled, isDone, runAndReset, set, setException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunStateRecordedFutureTask

public RunStateRecordedFutureTask(Callable<V> callable)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in interface RunnableFuture<V>
Overrides:
run in class FutureTask<V>

getAfterRun

public V getAfterRun()
              throws InterruptedException,
                     ExecutionException,
                     FutureTaskNotRunYetException
Throws:
InterruptedException
ExecutionException
FutureTaskNotRunYetException


Copyright © 2018. All rights reserved.