|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.lib.lang.RunnableCallable
@InterfaceAudience.Private public class RunnableCallable
Adapter class that allows Runnable
s and Callable
s to
be treated as the other.
Constructor Summary | |
---|---|
RunnableCallable(Callable<?> callable)
Constructor that takes a callable. |
|
RunnableCallable(Runnable runnable)
Constructor that takes a runnable. |
Method Summary | |
---|---|
Void |
call()
Invokes the wrapped callable/runnable as a callable. |
void |
run()
Invokes the wrapped callable/runnable as a runnable. |
String |
toString()
Returns the class name of the wrapper callable/runnable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RunnableCallable(Runnable runnable)
runnable
- runnable.public RunnableCallable(Callable<?> callable)
callable
- callable.Method Detail |
---|
public Void call() throws Exception
call
in interface Callable<Void>
Exception
- thrown by the wrapped callable/runnable invocation.public void run()
run
in interface Runnable
RuntimeException
- thrown by the wrapped callable/runnable invocation.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |