API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent. Exchanger View Source
Author(s)
Doug Lea and Bill Scherer and Michael Scott
Since
1.5
Version
Serial
Hierarchy
 Object
      Exchanger
Implements
Subclasses
Description
public class Exchanger
  A synchronization point at which threads can pair and swap elements within pairs.
See also:   
Constructors
public Exchanger ()
Creates a new Exchanger.
Methods
Hide/Show inherited methods
public V exchange ( V x) throws InterruptedException
  Waits for another thread to arrive at this exchange point (unless the current thread is interrupted), and then transfers the given object to it, receiving its object in return.
public V exchange ( V x, long timeout, TimeUnit unit) throws InterruptedException TimeoutException
  Waits for another thread to arrive at this exchange point (unless the current thread is interrupted or the specified waiting time elapses), and then transfers the given object to it, receiving its object in return.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar