All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class SWEEP.MultiQueue

java.lang.Object
   |
   +----SWEEP.MultiQueue

public class MultiQueue
extends Object
implements Serializable
Here MultiQueue will simulate the Multi-Channel FIFO channel between DW and ISs. There are three kinds of Queues in this Multi-Channel. 1. QueryQueues: Send Query from DW to IS, will be shared by DW. Belongs to each IS 2. QueryResultQueues: Send Query Resutl from IS to DW, will be shared by DW. Belongs to each IS 3. UpdateDataQueue: Send Update from IS to DW, will be shared by each IS. Belongs to each DW Now, In my implementation, I NEW all the queues in this MultiQueue system, and distribute the Queues to corresponding ISs.

In the future, is better to put all the Queues inside corresponding DW or ISs. Then, create Another two methods, to insert and delete the Queues reference to the MultiQueue.


Variable Index

 o QueryQueues
 o QueryResultQueues
 o QueueNumber
 o UpdateDataQueue

Constructor Index

 o MultiQueue(int)

Method Index

 o receive()
 o receiveQuery(int)
theIndex ranges from 1 to n.
 o receiveQueryResult(int)
theIndex ranges from 1 to n.
 o sendQuery(Relation, int)
Send Query from DW to ISs.
 o sendQueryResult(Relation, int)
Send QueryResult from ISs to DW.
 o SendUpdate(UpdateData)

Variables

 o QueryQueues
 Queue QueryQueues[]
 o QueryResultQueues
 Queue QueryResultQueues[]
 o UpdateDataQueue
 Queue UpdateDataQueue
 o QueueNumber
 int QueueNumber

Constructors

 o MultiQueue
 public MultiQueue(int ISNumber)

Methods

 o SendUpdate
 public boolean SendUpdate(UpdateData theUpdate) throws Exception
 o sendQuery
 public boolean sendQuery(Relation theDeltaR,
                          int theIndex) throws Exception
Send Query from DW to ISs.

 o sendQueryResult
 public boolean sendQueryResult(Relation theDeltaR,
                                int theIndex) throws Exception
Send QueryResult from ISs to DW.

 o receiveQueryResult
 public Relation receiveQueryResult(int theIndex) throws Exception
theIndex ranges from 1 to n. receive the queryresult from information source (theIndex) to DW. Wait until got some reply.

 o receiveQuery
 public Relation receiveQuery(int theIndex) throws Exception
theIndex ranges from 1 to n. receive the query from DW to ISs. Wait until got some reply.

 o receive
 public UpdateData receive() throws Exception

All Packages  Class Hierarchy  This Package  Previous  Next  Index