water
Class Futures

java.lang.Object
  extended by water.Futures

public class Futures
extends java.lang.Object

A collection of Futures. We can add more, or block on the whole collection. Undefined if you try to add Futures while blocking.

Used as a service to sub-tasks, collect pending-but-not-yet-done future tasks, that need to complete prior to *this* task completing... or if the caller of this task is knowledgeable, pass these pending tasks along to him to block on before he completes.


Constructor Summary
Futures()
           
 
Method Summary
 Futures add(java.util.concurrent.Future f)
          Some Future task which needs to complete before this task completes
 void add(Futures fs)
          Merge pending-task lists as part of doing a 'reduce' step
 void blockForPending()
          Block until all pending futures have completed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Futures

public Futures()
Method Detail

add

public Futures add(java.util.concurrent.Future f)
Some Future task which needs to complete before this task completes


add

public void add(Futures fs)
Merge pending-task lists as part of doing a 'reduce' step


blockForPending

public final void blockForPending()
Block until all pending futures have completed