Inheritance diagram for fr.dyade.aaa.agent.MessageQueue:

Public Member Functions | |
| void | insert (Message item) |
| void | push (Message item) |
| Message | pop () throws EmptyQueueException |
| void | validate () |
| Message | get () throws InterruptedException |
| Message | get (long timeout) throws InterruptedException |
| int | size () |
MessageQueue represents a First-In-First-Out (FIFO) persistent list of Message (source and target agent identifier, notification).
Definition at line 33 of file MessageQueue.java.
| void fr.dyade.aaa.agent.MessageQueue.insert | ( | Message | item | ) |
Insert a message in the queue, it should only be used during initialization for restoring the queue state.
| item | the message to be pushed onto this queue. |
Implemented in fr.dyade.aaa.agent.MessageVector.
Referenced by fr.dyade.aaa.agent.Engine.insert().
| void fr.dyade.aaa.agent.MessageQueue.push | ( | Message | item | ) |
Pushes a message onto the bottom of this queue. It should only be used during a transaction. The item will be really available after the transaction commit and the queue validate.
| item | the message to be pushed onto this queue. |
Implemented in fr.dyade.aaa.agent.MessageVector.
Referenced by fr.dyade.aaa.agent.Engine.post().
| Message fr.dyade.aaa.agent.MessageQueue.pop | ( | ) | throws EmptyQueueException |
Removes the message at the top of this queue. It must only be used during a transaction.
| EmptyQueueException | if this queue is empty. |
Implemented in fr.dyade.aaa.agent.MessageVector.
Referenced by fr.dyade.aaa.agent.Engine.abort(), fr.dyade.aaa.agent.GCEngine.commit(), fr.dyade.aaa.agent.Engine.commit(), and fr.dyade.aaa.agent.Engine.run().
| void fr.dyade.aaa.agent.MessageQueue.validate | ( | ) |
Atomicaly validates all messages pushed in queue during a reaction. It must only be used during a transaction.
Implemented in fr.dyade.aaa.agent.MessageVector.
Referenced by fr.dyade.aaa.agent.Engine.validate().
| Message fr.dyade.aaa.agent.MessageQueue.get | ( | ) | throws InterruptedException |
Looks at the message at the top of this queue without removing it from the queue. It should never be used during a transaction to avoid dead-lock problems.
| InterruptedException | if another thread has interrupted the current thread. |
Implemented in fr.dyade.aaa.agent.MessageVector.
Referenced by fr.dyade.aaa.agent.Engine.run().
| Message fr.dyade.aaa.agent.MessageQueue.get | ( | long | timeout | ) | throws InterruptedException |
Looks at the message at the top of this queue without removing it from the queue. It waits until a message is available or the specified amount of time has elapsed. It should never be used during a transaction to avoid dead-lock problems.
| timeout | the maximum time to wait in milliseconds. |
| InterruptedException | if another thread has interrupted the current thread. | |
| IllegalArgumentException | if the value of timeout is negative. |
Implemented in fr.dyade.aaa.agent.MessageVector.
| int fr.dyade.aaa.agent.MessageQueue.size | ( | ) |
Returns the number of messages in this MessageQueue object. Be careful, the result includes messages to be validated.
Implemented in fr.dyade.aaa.agent.MessageVector.
Referenced by fr.dyade.aaa.agent.HAEngine.commit(), fr.dyade.aaa.agent.GCEngine.commit(), fr.dyade.aaa.agent.Engine.getNbWaitingMessages(), and fr.dyade.aaa.agent.HAEngine.receiveFromJGroups().
1.5.0