org.objectweb.dream.queue
Class PushPullQueueNotSynchronizedImpl
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.queue.PushPullQueueNotSynchronizedImpl
- All Implemented Interfaces:
- ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, Pull, Push, BufferAttributeController, AttributeController, BindingController, LifeCycleController
public class PushPullQueueNotSynchronizedImpl
- extends AbstractComponent
- implements Push, Pull, BufferAttributeController
High performance implementation of a Push/Pull queue. This queue has the
following properties :
- FIFO
- Not Thread safe
- Has no maximum capacity
pull()
returns null
if queue is empty.
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 |
list
protected List<Message> list
size
protected int size
PushPullQueueNotSynchronizedImpl
public PushPullQueueNotSynchronizedImpl()
push
public void push(Message message)
- Specified by:
push
in interface Push
- See Also:
Push.push(Message)
pull
public Message pull()
throws PullException
- Specified by:
pull
in interface Pull
- Throws:
PullException
- See Also:
Pull.pull()
getCurrentSize
public int getCurrentSize()
- Description copied from interface:
BufferAttributeController
- Returns the current size of the queue.
- Specified by:
getCurrentSize
in interface BufferAttributeController
- Returns:
- the current size of the queue.
- See Also:
BufferAttributeController.getCurrentSize()
getMaxCapacity
public int getMaxCapacity()
- Description copied from interface:
BufferAttributeController
- Returns the maximum capacity of the queue.
- Specified by:
getMaxCapacity
in interface BufferAttributeController
- Returns:
- the maximum capacity of the queue.
- See Also:
BufferAttributeController.getMaxCapacity()
setMaxCapacity
public void setMaxCapacity(int maxCapacity)
- Description copied from interface:
BufferAttributeController
- Sets the maximum capacity of the queue.
- Specified by:
setMaxCapacity
in interface BufferAttributeController
- Parameters:
maxCapacity
- the maximum capacity of the queue.- See Also:
BufferAttributeController.setMaxCapacity(int)
listFc
public String[] listFc()
- Specified by:
listFc
in interface BindingController
- See Also:
BindingController.listFc()
Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.