Class wb.Sync
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class wb.Sync

java.lang.Object
   |
   +----wb.Sync

public class Sync
extends Object
This class enables synchronizing Data/Threads. Originally designed to cater the problem of Producer/Consumer.

Constructor Index

 o Sync()
Creates a new Sync Class

Method Index

 o get()
Gets the Stored Object and which is stored using put would wait until the data is available
 o put(Object)
Store the Object and can be retrieved using get

Constructors

 o Sync
  public Sync()
Creates a new Sync Class

Methods

 o put
  public synchronized void put(Object arg)
Store the Object and can be retrieved using get
Parameters:
arg - the object that is stored
 o get
  public synchronized Object get()
Gets the Stored Object and which is stored using put would wait until the data is available
Returns:
Object the object that is stored null if there are none.

All Packages  Class Hierarchy  This Package  Previous  Next  Index