Package org.jgroups.blocks.executor
Class ExecutionService.RunnableAdapter<T>
- java.lang.Object
-
- org.jgroups.blocks.executor.ExecutionService.RunnableAdapter<T>
-
- All Implemented Interfaces:
java.util.concurrent.Callable<T>
,Streamable
- Enclosing class:
- ExecutionService
protected static final class ExecutionService.RunnableAdapter<T> extends java.lang.Object implements java.util.concurrent.Callable<T>, Streamable
This is copied fromExecutors
class which contains RunnableAdapter. However that adapter isn't serializable, and is final and package level so we can' reference.
-
-
Constructor Summary
Constructors Modifier Constructor Description RunnableAdapter()
protected
RunnableAdapter(java.lang.Runnable task, T result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
call()
void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedvoid
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Field Detail
-
task
protected java.lang.Runnable task
-
result
protected T result
-
-
Constructor Detail
-
RunnableAdapter
public RunnableAdapter()
-
RunnableAdapter
protected RunnableAdapter(java.lang.Runnable task, T result)
-
-
Method Detail
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-