ch.epfl.lpd.ids.utils
Interface IBlockingQueue<T>

All Known Implementing Classes:
MyBlockingQueue, MyPriorityBlockingQueue

public interface IBlockingQueue<T>

This class is the specification of a Blocking Queue. This class is generic and handles object of type T.

Author:
Sebastien Baehni

Method Summary
 T get()
          Method used to get a new object of type T.
 void put(T obj)
          Method used to put a new object of type T into this queue.
 

Method Detail

get

T get()
      throws InterruptedException
Method used to get a new object of type T. This method will wait until new messages are in the queue.

Returns:
The last object of type T of this queue.
Throws:
InterruptedException - If an exception occurs while waiting for the next element of this queue.

put

void put(T obj)
Method used to put a new object of type T into this queue.

Parameters:
obj - The object to put into this queue.