com.ibm.dse.automaton
Class Queue

java.lang.Object
  |
  +--com.ibm.dse.automaton.Queue

public class Queue
extends java.lang.Object
implements Buffer

A FIFO queue implementation.


Field Summary
protected  java.lang.Object[] buf
           
protected  int count
           
protected  int in
           
protected  int out
           
protected  int size
           
 
Constructor Summary
Queue()
          Creates an EventQueue object.
Queue(int size)
          Creates an EventQueue given the value of the size property.
 
Method Summary
 java.lang.Object get()
          Getting an object from the EventQueue.
 int getCount()
          Returns the value of the count property.
 void put(java.lang.Object obj)
          Putting an object into the EventQueue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected java.lang.Object[] buf

in

protected int in

out

protected int out

count

protected int count

size

protected int size
Constructor Detail

Queue

public Queue()
Creates an EventQueue object.

Queue

public Queue(int size)
Creates an EventQueue given the value of the size property.
Parameters:
size - int
Method Detail

get

public java.lang.Object get()
                     throws java.lang.InterruptedException
Getting an object from the EventQueue.
Specified by:
get in interface Buffer
Returns:
java.lang.Object
Throws:
java.lang.InterruptedException -  

getCount

public int getCount()
Returns the value of the count property.
Returns:
int

put

public void put(java.lang.Object obj)
         throws java.lang.InterruptedException
Putting an object into the EventQueue.
Specified by:
put in interface Buffer
Parameters:
obj - java.lang.Object
Throws:
java.lang.InterruptedException -