com.hazelcast.core
Class MultiTask<V>

java.lang.Object
  extended by java.util.concurrent.FutureTask<V>
      extended by com.hazelcast.core.DistributedTask
          extended by com.hazelcast.core.MultiTask<V>
All Implemented Interfaces:
Runnable, Future, RunnableFuture

public class MultiTask<V>
extends DistributedTask


Nested Class Summary
 
Nested classes/interfaces inherited from class com.hazelcast.core.DistributedTask
DistributedTask.DistributedRunnableAdapterImpl<V>, DistributedTask.Inner
 
Field Summary
protected  Collection<V> results
           
 
Constructor Summary
MultiTask(Callable<V> callable, Set<Member> members)
           
 
Method Summary
 Collection<V> get()
           
 Collection<V> get(long timeout, TimeUnit unit)
           
 void onResult(Object result)
           
 
Methods inherited from class com.hazelcast.core.DistributedTask
callable, cancel, getExecutionCallback, getInner, isCancelled, isDone, set, setExecutionCallback, setMemberLeft
 
Methods inherited from class java.util.concurrent.FutureTask
done, run, runAndReset, setException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

protected Collection<V> results
Constructor Detail

MultiTask

public MultiTask(Callable<V> callable,
                 Set<Member> members)
Method Detail

onResult

public void onResult(Object result)
Overrides:
onResult in class DistributedTask

get

public Collection<V> get()
                  throws ExecutionException,
                         InterruptedException
Specified by:
get in interface Future
Overrides:
get in class DistributedTask
Throws:
ExecutionException
InterruptedException

get

public Collection<V> get(long timeout,
                         TimeUnit unit)
                  throws InterruptedException,
                         ExecutionException,
                         TimeoutException
Specified by:
get in interface Future
Overrides:
get in class DistributedTask
Throws:
InterruptedException
ExecutionException
TimeoutException


Copyright © 2008-2012 Hazel Ltd. All Rights Reserved.