org.objectweb.dream.queue.keyed
Interface BufferAttributeControllerAscendingSequenceNumberKeyedAdd

All Superinterfaces:
AttributeController, BufferAttributeController, BufferAttributeControllerKeyed, BufferAttributeControllerSorted
All Known Subinterfaces:
BufferAttributeControllerAscendingSequenceNumberKeyChunkAdd
All Known Implementing Classes:
BufferAscendingSequenceNumberKeyedAddKeyedRemoveImpl

public interface BufferAttributeControllerAscendingSequenceNumberKeyedAdd
extends BufferAttributeControllerSorted, BufferAttributeControllerKeyed

Attribute controller for buffers that sort messages by keys according to an ascending sequence number. It allows getting/setting the sequence number of the last delivered message for the different keys.


Method Summary
 long getLastInSequence(Object key)
          Returns the sequence number of the last delivered message for the given key.
 void setLastInSequence(Object key, long lastInSequence)
          Sets the sequence number of the last delivered message for the given key.
 
Methods inherited from interface org.objectweb.dream.queue.BufferAttributeControllerSorted
getSortingChunkName, setSortingChunkName
 
Methods inherited from interface org.objectweb.dream.queue.BufferAttributeController
getCurrentSize, getMaxCapacity, setMaxCapacity
 
Methods inherited from interface org.objectweb.dream.queue.keyed.BufferAttributeControllerKeyed
getKeys
 

Method Detail

getLastInSequence

long getLastInSequence(Object key)
                       throws InterruptedException
Returns the sequence number of the last delivered message for the given key.

Parameters:
key - the key for which the last sequence number in sequence must be returned.
Returns:
the sequence number of the last delivered message for the given key.
Throws:
InterruptedException - if it is interrupted while waiting for the mutex to be acquired.

setLastInSequence

void setLastInSequence(Object key,
                       long lastInSequence)
                       throws InterruptedException
Sets the sequence number of the last delivered message for the given key.

Parameters:
key - the key for which the last sequence number in sequence must be set.
lastInSequence - the sequence number to be set.
Throws:
InterruptedException - if it is interrupted while waiting for the mutex to be acquired.


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