org.mentaqueue.wait
Class SpinWaitStrategy

java.lang.Object
  extended by org.mentaqueue.wait.SpinWaitStrategy
All Implemented Interfaces:
WaitStrategy

public class SpinWaitStrategy
extends Object
implements WaitStrategy

A wait strategy that just performs busy spinning.

Author:
Sergio Oliveira Jr.

Constructor Summary
SpinWaitStrategy()
           
 
Method Summary
 void reset()
          Reset the strategy because we have waited and we have accomplished what we were waiting for.
 void waitForOtherThread()
          Do something to wait: busy spinning, yield or sleep.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpinWaitStrategy

public SpinWaitStrategy()
Method Detail

waitForOtherThread

public final void waitForOtherThread()
Description copied from interface: WaitStrategy
Do something to wait: busy spinning, yield or sleep.

Specified by:
waitForOtherThread in interface WaitStrategy

reset

public final void reset()
Description copied from interface: WaitStrategy
Reset the strategy because we have waited and we have accomplished what we were waiting for.

Specified by:
reset in interface WaitStrategy


Copyright © 2012. All Rights Reserved.