All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.Watcher

java.lang.Object
   |
   +----pinball.Watcher

public class Watcher
extends Object
implements Serializable
The monitor for the locks on the threads.


Variable Index

 o analyzed
Buffer frame was analyzed.
 o busyAnalysis
Buffer is in analysis.
 o busyGrabber
Buffer is in frame grabber.
 o busyPost
Buffer is in post.
 o busyStrategy
Buffer is in strategy.
 o empty
The values for the lock positions.
 o grabed
Buffer frame was grabed.
 o posted
Buffer frame was drawn on the screen.
 o strategied
Buffer frame was used to make the flipping descision.

Constructor Index

 o Watcher()
Setup the lock for the threads.

Method Index

 o analyze(int)
Start analyze.
 o analyzed(int)
End analyze.
 o grab(int)
Start grab.
 o grabed(int)
End grab.
 o post(int)
Start display.
 o posted(int)
End display.
 o status()
Find the status of the lock.
 o strategied(int)
End strategy.
 o strategy(int)
Start strategy.

Variables

 o empty
 public final int empty
The values for the lock positions.

 o grabed
 public final int grabed
Buffer frame was grabed.

 o analyzed
 public final int analyzed
Buffer frame was analyzed.

 o strategied
 public final int strategied
Buffer frame was used to make the flipping descision.

 o posted
 public final int posted
Buffer frame was drawn on the screen.

 o busyGrabber
 public final int busyGrabber
Buffer is in frame grabber.

 o busyAnalysis
 public final int busyAnalysis
Buffer is in analysis.

 o busyStrategy
 public final int busyStrategy
Buffer is in strategy.

 o busyPost
 public final int busyPost
Buffer is in post.

Constructors

 o Watcher
 public Watcher()
Setup the lock for the threads.

Methods

 o grab
 public synchronized void grab(int d)
Start grab. Wait for frame to be empty.

Parameters:
id - id of buffer, used for debugging.
 o grabed
 public synchronized void grabed(int d)
End grab. Set frame to next stage status.

Parameters:
id - id of buffer, used for debugging.
 o analyze
 public synchronized void analyze(int d)
Start analyze. Wait for frame to be grabbed.

Parameters:
id - id of buffer, used for debugging.
 o analyzed
 public synchronized void analyzed(int d)
End analyze. Set frame to next stage status.

Parameters:
id - id of buffer, used for debugging.
 o strategy
 public synchronized void strategy(int d)
Start strategy. Wait for frame to be analyzed.

Parameters:
id - id of buffer, used for debugging.
 o strategied
 public synchronized void strategied(int d)
End strategy. Set frame to next stage status.

Parameters:
id - id of buffer, used for debugging.
 o post
 public synchronized void post(int d)
Start display. Wait for frame to got through strategy.

Parameters:
id - id of buffer, used for debugging.
 o posted
 public synchronized void posted(int d)
End display. Set frame to next stage status.

Parameters:
id - id of buffer, used for debugging.
 o status
 public synchronized int status()
Find the status of the lock.

Returns:
the status of the lock.

All Packages  Class Hierarchy  This Package  Previous  Next  Index