org.objectweb.dream.queue
Interface BufferRemoveFirstLast

All Known Implementing Classes:
AbstractBufferImpl

public interface BufferRemoveFirstLast

This interface defines methods that must be implemented by a buffer for removing messages from its begining or from its end.


Field Summary
static String ITF_NAME
          The commonly used name to refer to this interface.
 
Method Summary
 Message getFirst()
          Returns the first message in this buffer.
 Message getLast()
          Returns the last message in this buffer.
 Message removeFirst()
          Removes and returns the first message from this buffer.
 Message removeLast()
          Removes and returns the last message from this buffer.
 

Field Detail

ITF_NAME

public static final String ITF_NAME
The commonly used name to refer to this interface.

See Also:
Constant Field Values
Method Detail

getFirst

public Message getFirst()
                 throws InterruptedException
Returns the first message in this buffer. If no message is available, this method blocks.

Returns:
the first message in this list.
Throws:
InterruptedException - if it is interrupted while waiting for a message to be added.

removeFirst

public Message removeFirst()
                    throws InterruptedException
Removes and returns the first message from this buffer. If no message is available, this method blocks.

Returns:
the first message from this buffer.
Throws:
InterruptedException - if it is interrupted while waiting for a message to be added.

getLast

public Message getLast()
                throws InterruptedException
Returns the last message in this buffer. If no message is available, this method blocks.

Returns:
the last message in this list.
Throws:
InterruptedException - if it is interrupted while waiting for a message to be added.

removeLast

public Message removeLast()
                   throws InterruptedException
Removes and returns the last message from this buffer. If no message is available, this method blocks.

Returns:
the last message from this buffer.
Throws:
InterruptedException - if it is interrupted while waiting for a message to be added.


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