org.objectweb.dream.synchro
Class SemaphoreFIFOImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.synchro.SemaphoreImpl
          extended by org.objectweb.dream.synchro.AbstractSemaphoreQueuedImpl
              extended by org.objectweb.dream.synchro.SemaphoreFIFOImpl
All Implemented Interfaces:
ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, Semaphore, SemaphoreAttributeController, AttributeController, BindingController, LifeCycleController

public class SemaphoreFIFOImpl
extends AbstractSemaphoreQueuedImpl

FIFO implementation of the Semaphoreinterface. Waiting requests will be satisfied in FIFO order.

Note: Inspired by Doug Lea's implementation.


Nested Class Summary
protected static class SemaphoreFIFOImpl.FIFOWaitQueue
          Simple linked list queue used in FIFOSemaphore.
 
Nested classes/interfaces inherited from class org.objectweb.dream.synchro.AbstractSemaphoreQueuedImpl
AbstractSemaphoreQueuedImpl.WaitQueue
 
Field Summary
 
Fields inherited from class org.objectweb.dream.synchro.AbstractSemaphoreQueuedImpl
wq
 
Fields inherited from class org.objectweb.dream.synchro.SemaphoreImpl
permits
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.synchro.Semaphore
ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
SemaphoreFIFOImpl()
          Constructor.
 
Method Summary
 
Methods inherited from class org.objectweb.dream.synchro.AbstractSemaphoreQueuedImpl
acquire, attempt, getSignallee, listFc, precheck, recheck, release, release
 
Methods inherited from class org.objectweb.dream.synchro.SemaphoreImpl
getInitialPermits, permits, setInitialPermits
 
Methods inherited from class org.objectweb.dream.AbstractComponent
beforeFirstStart, bindFc, bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, setLogger, startFc, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemaphoreFIFOImpl

public SemaphoreFIFOImpl()
Constructor.



Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.