org.jutil.java.collections
Class BlockingFifoList

java.lang.Object
  |
  +--org.jutil.java.collections.FifoList
        |
        +--org.jutil.java.collections.BlockingFifoList
All Implemented Interfaces:
Fifo

public class BlockingFifoList
extends FifoList

Synchronized fifo list that will block the request to pop the first object until a first object is present.

Version:
$Revision: 1.3 $
Author:
Tom Schrijvers, Marko van Dooren

Constructor Summary
BlockingFifoList()
          public behavior

post size() == 0;
Initialize a new empty blocking fifo list.
 
Method Summary
 void clear()
          See superclass/
 java.lang.Object pop()
          also public behavior

pre true;
See superclass.
 void push(java.lang.Object object)
          See superclass.
 int size()
          See superclass.
 
Methods inherited from class org.jutil.java.collections.FifoList
isEmpty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockingFifoList

public BlockingFifoList()
public behavior

post size() == 0;
Initialize a new empty blocking fifo list.
Method Detail

push

public void push(java.lang.Object object)
See superclass.
Overrides:
push in class FifoList
Following copied from interface: org.jutil.java.collections.Fifo
Parameters:
object - The object to be put in the fifo.

pop

public java.lang.Object pop()
also public behavior

pre true;
See superclass. Will block until the list is non-empty.
Overrides:
pop in class FifoList

clear

public void clear()
See superclass/
Overrides:
clear in class FifoList

size

public int size()
See superclass.
Overrides:
size in class FifoList