org.objectweb.dream.pump
Class PumpPeriodicSynchronizedImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.pump.PumpSynchronizedImpl
          extended byorg.objectweb.dream.pump.PumpPeriodicSynchronizedImpl
All Implemented Interfaces:
ActiveComponentAttributeController, AttributeController, BindingController, LifeCycleController, Loggable, PumpAttributeController, PumpPeriodicAttributeController

public class PumpPeriodicSynchronizedImpl
extends PumpSynchronizedImpl
implements PumpPeriodicAttributeController

Extention of the basic pump that use a period T (in ms). More precisely, every T ms, a message is pulled on the input and is then pushed on the output. If these two actions (pull then push) are longer than T ms, an other message is pulled immediately.


Field Summary
protected  long period
           
static String PERIOD_INIT_PARAM_NAME
          The initialization parameter that can be passed to this component to specify the pump's period.
 
Fields inherited from class org.objectweb.dream.pump.PumpSynchronizedImpl
initialCapacity, initialNumberOfThreads, inPullItf, mutexItf, outPushItf, pumpTask, pushNullPolicy, usePool
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
PumpPeriodicSynchronizedImpl()
          Default constructor
 
Method Summary
 long getPeriod()
          Returns the pump period.
 void setPeriod(long period)
          Sets the pump period.
 
Methods inherited from class org.objectweb.dream.pump.PumpSynchronizedImpl
beforeFirstStart, bindFc, getInitialCapacity, getInitialNumberOfThreads, getPushNullPolicy, getUsePool, listFc, setInitialCapacity, setInitialNumberOfThreads, setPushNullPolicy, setUsePool, startFc
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, initComponent, lookupFc, setLogger, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.dream.pump.PumpAttributeController
getPushNullPolicy, setPushNullPolicy
 
Methods inherited from interface org.objectweb.dream.control.activity.ActiveComponentAttributeController
getInitialCapacity, getInitialNumberOfThreads, getUsePool, setInitialCapacity, setInitialNumberOfThreads, setUsePool
 

Field Detail

PERIOD_INIT_PARAM_NAME

public static final String PERIOD_INIT_PARAM_NAME
The initialization parameter that can be passed to this component to specify the pump's period.

See Also:
Constant Field Values

period

protected long period
Constructor Detail

PumpPeriodicSynchronizedImpl

public PumpPeriodicSynchronizedImpl()
Default constructor

Method Detail

getPeriod

public long getPeriod()
Description copied from interface: PumpPeriodicAttributeController
Returns the pump period.

Specified by:
getPeriod in interface PumpPeriodicAttributeController
Returns:
the pump period.
See Also:
PumpPeriodicAttributeController.getPeriod()

setPeriod

public void setPeriod(long period)
Description copied from interface: PumpPeriodicAttributeController
Sets the pump period.

Specified by:
setPeriod in interface PumpPeriodicAttributeController
Parameters:
period - the pump period.
See Also:
PumpPeriodicAttributeController.setPeriod(long)


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