org.jgroups.blocks.executor
Class ExecutionService.RunnableAdapter<T>

java.lang.Object
  extended by 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 from Executors class which contains RunnableAdapter. However that adapter isn't serializable, and is final and package level so we can' reference.


Field Summary
protected  T result
           
protected  java.lang.Runnable task
           
 
Constructor Summary
  ExecutionService.RunnableAdapter()
           
protected ExecutionService.RunnableAdapter(java.lang.Runnable task, T result)
           
 
Method Summary
 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 closed
 void writeTo(java.io.DataOutput out)
          Write the entire state of the current object (including superclasses) to outstream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

task

protected java.lang.Runnable task

result

protected T result
Constructor Detail

ExecutionService.RunnableAdapter

public ExecutionService.RunnableAdapter()

ExecutionService.RunnableAdapter

protected ExecutionService.RunnableAdapter(java.lang.Runnable task,
                                           T result)
Method Detail

call

public T call()
Specified by:
call in interface java.util.concurrent.Callable<T>

writeTo

public void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
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 interface Streamable
Throws:
java.lang.Exception

readFrom

public void readFrom(java.io.DataInput in)
              throws java.lang.Exception
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 interface Streamable
Throws:
java.lang.Exception


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.