org.objectweb.dream.queue
Interface BufferAttributeController

All Superinterfaces:
AttributeController
All Known Subinterfaces:
BufferAttributeControllerAscendingKeyKeyChunkAdd, BufferAttributeControllerAscendingSequenceNumber, BufferAttributeControllerAscendingSequenceNumberKeyChunkAdd, BufferAttributeControllerAscendingSequenceNumberKeyedAdd, BufferAttributeControllerKeyChunkAdd, BufferAttributeControllerSorted
All Known Implementing Classes:
AbstractBufferImpl, AbstractBufferKeyedAddKeyedRemoveImpl, AbstractBufferKeyedRemoveImpl, BufferAscendingKeyKeyChunkAddDoubleKeyedRemoveImpl, BufferAscendingSequenceNumberImpl, BufferAscendingSequenceNumberKeyedAddKeyedRemoveImpl, BufferFIFOImpl, BufferKeyChunkAddKeyedRemoveImpl, BufferKeyedAddKeyedRemoveImpl, BufferKeyMutexSortedImpl, BufferLIFOImpl, BufferMatchingImpl, BufferSortingImpl, PushPullQueueFastImpl, PushPullQueueNotSynchronizedImpl

public interface BufferAttributeController
extends AttributeController

Base attribute controller interface for buffer implementations. It defines a read only attribute which is the current size of the buffer. It also defines the maximum capacity of the buffer. A maximum capacity equals to zero indicates that there 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

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

Returns:
the current size of the queue.

getMaxCapacity

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

Returns:
the maximum capacity of the queue.

setMaxCapacity

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

Parameters:
maxCapacity - the maximum capacity of the queue.
Throws:
IllegalArgumentException - if maxCapacity is negative.
InterruptedException - if it is interrupted while waiting for the mutex to be acquired.


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