|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.cs.db.yfilter.filterinstance.Queue
Implements a circular queue.
Field Summary | |
protected java.util.Vector |
data
To store additional data, per element in the Vector. |
protected static int |
DOC_QUEUE
Indicates that the queue contains documents. |
protected java.util.Vector |
elements
Stores the actual elements. |
protected EXfilter |
filter
The filter object, used to handle query additions and deletions. |
protected int |
idInProcess
The current obect being processed. |
protected int |
index
A cumulative index for the elements passing through the queue. |
protected int |
max_index
The max index present in the queue. |
protected int |
min_index
The least index present in the queue. |
static java.lang.String |
NO_RESULT
|
static java.lang.String |
OBJ_EXPIRED
|
static java.lang.String |
OBJ_NA
|
protected int |
qType
This queue is a document queue by default. |
protected static int |
QUERY_QUEUE
Indicates that the queue contains queries. |
protected java.util.Hashtable |
queryIDMap
Handles the map between queue and filter ids for queries, since the filter asynchronously assignes IDs to queries. |
static int |
WAIT
For threads, the wait period for notification. |
Constructor Summary | |
Queue()
Default constructor. |
|
Queue(int capacity)
|
|
Queue(int capacity,
EXfilter filter)
|
Method Summary | |
java.lang.Object |
get(int id)
Gets an object from the queue. |
java.lang.Object |
getData(int id)
Gets the data associated with the id. |
java.util.Hashtable |
processNext()
|
int |
set(java.lang.Object o)
Adds an object to the queue. |
boolean |
setData(java.lang.Object o,
int id)
Adds a data object corresponding to an id. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int WAIT
public static java.lang.String NO_RESULT
public static java.lang.String OBJ_EXPIRED
public static java.lang.String OBJ_NA
protected static int DOC_QUEUE
protected static int QUERY_QUEUE
protected int qType
protected int min_index
protected int max_index
protected int index
protected java.util.Vector elements
protected java.util.Vector data
protected int idInProcess
protected EXfilter filter
protected java.util.Hashtable queryIDMap
Constructor Detail |
public Queue(int capacity)
capacity
- public Queue(int capacity, EXfilter filter)
public Queue()
Method Detail |
public int set(java.lang.Object o)
o
- The object to be added.
public java.lang.Object get(int id)
id
- The object id
public java.lang.Object getData(int id)
public boolean setData(java.lang.Object o, int id)
o
- The data object to be added.id
- The id of the corressponding object
public java.util.Hashtable processNext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |