EVEDemo.SWEEP
Class MultiQueue
java.lang.Object
|
+--EVEDemo.SWEEP.MultiQueue
- public class MultiQueue
- extends java.lang.Object
- implements java.io.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.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
QueryQueues
Queue[] QueryQueues
QueryResultQueues
Queue[] QueryResultQueues
UpdateDataQueue
Queue UpdateDataQueue
QueueNumber
int QueueNumber
MultiQueue
public MultiQueue(int ISNumber)
SendUpdate
public boolean SendUpdate(UpdateData theUpdate)
throws java.lang.Exception
sendQuery
public boolean sendQuery(Relation theDeltaR,
int theIndex)
throws java.lang.Exception
- Send Query from DW to ISs.
sendQueryResult
public boolean sendQueryResult(Relation theDeltaR,
int theIndex)
throws java.lang.Exception
- Send QueryResult from ISs to DW.
receiveQueryResult
public Relation receiveQueryResult(int theIndex)
throws java.lang.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 java.lang.Exception
- theIndex ranges from 1 to n.
receive the query from DW to ISs.
Wait until got some reply.
receive
public UpdateData receive()
throws java.lang.Exception