org.objectweb.dream.queue
Interface QueueAttributeController

All Superinterfaces:
AttributeController
All Known Subinterfaces:
PushPullQueueAttributeController, PushQueueAttributeController
All Known Implementing Classes:
AbstractPushQueueImpl, BasicPushPullQueueImpl, NotSynchronizedPushPullQueueImpl

public interface QueueAttributeController
extends AttributeController

Base attribute controller interface for queue implementations. It defines a read only attribute which is the current size of the queue. It defines also the maximum capacity of the queue. A maximum capacity equals to zero indicate that their is no capacity limitation.


Method Summary
 int getCurrentSize()
          Returns the current size of the queue.
 int getMaxCapacity()
          Returns the maximum capacity of the queue.
 void setMaxCapacity(int maxCapacity)
          Sets the maximum capacity of the queue.
 

Method Detail

getCurrentSize

public int getCurrentSize()
Returns the current size of the queue.

Returns:
the current size of the queue.

getMaxCapacity

public int getMaxCapacity()
Returns the maximum capacity of the queue.

Returns:
the maximum capacity of the queue.

setMaxCapacity

public void setMaxCapacity(int maxCapacity)
Sets the maximum capacity of the queue.

Parameters:
maxCapacity - the maximum capacity of the queue.
Throws:
IllegalArgumentException - if maxCapacity is negative.


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