using System;
namespace grof{
namespace util
{
/// <summary>
/// The <c>IBlockingQueue</c> provides method for
/// queuing and dequeuing elements.
/// </summary>
public interface IBlockingQueue<T>
{
/// <summary>
/// Puts an element into the queue.
/// </summary>
/// <param name="element">The element which is cached
/// in the queue.</param>
void Put( T element );
/// <summary>
/// Retrieves an element from the queue.
/// </summary>
/// <returns>The retrieved element.</returns>
T Take();
/// <summary>
/// Returns the size of the queue.
/// </summary>
/// <returns>The number of cached elements.</returns>
int Size();
/// <summary>
/// Stops the queue, that means no further elements
/// can be queued or dequeued in and from queue.
/// </summary>
void Stop();
}
}
}
|