edu.umd.cs.db.xsq
Class HPDTOutputQ

java.lang.Object
  |
  +--edu.umd.cs.db.xsq.HPDTOutputQ

public class HPDTOutputQ
extends java.lang.Object

The HPDT keep every possible answer in the HPDT queue. The actual content is stored here. Associated with each content is a unique item id, a reference count, and the actual string content. Each enqueue operation will insert the item into the global queue. If the item is already in the queue, the reference count is increased by one. The clear operation will decrease the reference count by one. Only when the reference count is zero do we remove the item from the queue. When a BPDT is FLUSH the content, the items are marked as 'output'. However, the content cannot be sent to output until all the items before it have been send to output.


Field Summary
 boolean isEmpty
           
 
Constructor Summary
HPDTOutputQ()
           
 
Method Summary
 void add(edu.umd.cs.db.xsq.QueueItem qi)
           
 java.lang.String checkAll(boolean result)
           
 edu.umd.cs.db.xsq.QueueItem get(int i)
           
 int size()
          Return the size of the output queue.
 java.lang.String toString()
          Return all the content in the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isEmpty

public boolean isEmpty
Constructor Detail

HPDTOutputQ

public HPDTOutputQ()
Method Detail

add

public void add(edu.umd.cs.db.xsq.QueueItem qi)

checkAll

public java.lang.String checkAll(boolean result)
Parameters:
result - If result is true, the return value will the string that sent to the output. Or else the return value is null.

toString

public java.lang.String toString()
Return all the content in the queue.

Overrides:
toString in class java.lang.Object

get

public edu.umd.cs.db.xsq.QueueItem get(int i)

size

public int size()
Return the size of the output queue.