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.
-
QueryQueues
-
-
QueryResultQueues
-
-
QueueNumber
-
-
UpdateDataQueue
-
-
MultiQueue(int)
-
-
receive()
-
-
receiveQuery(int)
- theIndex ranges from 1 to n.
-
receiveQueryResult(int)
- theIndex ranges from 1 to n.
-
sendQuery(Relation, int)
- Send Query from DW to ISs.
-
sendQueryResult(Relation, int)
- Send QueryResult from ISs to DW.
-
SendUpdate(UpdateData)
-
QueryQueues
Queue QueryQueues[]
QueryResultQueues
Queue QueryResultQueues[]
UpdateDataQueue
Queue UpdateDataQueue
QueueNumber
int QueueNumber
MultiQueue
public MultiQueue(int ISNumber)
SendUpdate
public boolean SendUpdate(UpdateData theUpdate) throws Exception
sendQuery
public boolean sendQuery(Relation theDeltaR,
int theIndex) throws Exception
- Send Query from DW to ISs.
sendQueryResult
public boolean sendQueryResult(Relation theDeltaR,
int theIndex) throws Exception
- Send QueryResult from ISs to DW.
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.
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.
receive
public UpdateData receive() throws Exception
All Packages Class Hierarchy This Package Previous Next Index