aleph
Class Join

java.lang.Object
  |
  +--aleph.Join

public class Join
extends java.lang.Object
implements java.io.Serializable, java.util.Iterator

Join objects.

A Join object is an optional argument to RemoteThread or RemoteFunction calls. A thread that calls the Join object's waitFor method is blocked until all remote threads started with that Join object have finished. A Join object also implements java.util.Iterator. The Iterator methods can be used to collect the results of multiple remote threads as they become available.

See Also:
Serialized Form

Constructor Summary
Join()
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
          Unsupported operation
 void signal()
          Inform everyone that I'm finished.
 void signal(java.lang.Object object)
          Inform everyone that I'm finished.
 java.lang.String toString()
           
 void waitFor()
          Wait for all threads started with this join object to finish.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Join

public Join()
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator
Returns:
whether any more return values are lurking here.

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Specified by:
next in interface java.util.Iterator
Returns:
next lurking return value.

remove

public void remove()
Unsupported operation
Specified by:
remove in interface java.util.Iterator
Throws:
UnsupportedOperationException -  

signal

public void signal(java.lang.Object object)
Inform everyone that I'm finished.
Parameters:
object - optional argument

signal

public void signal()
Inform everyone that I'm finished.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

waitFor

public void waitFor()
Wait for all threads started with this join object to finish.