|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Message wrapper, used to store information on. More...
Public Member Functions | |
| MessageWrapper (Message message) | |
| Constructor. | |
| MessageWrapper (Message message, long ncccs, long timeStamp, Collection< Object > destinations, int messageCounter) | |
| Constructor. | |
| Message | getMessage () |
| Object | getDestination () |
| Collection< Object > | getDestinations () |
| long | getNCCCs () |
| long | getTime () |
| void | setNCCCs (long ncccs) |
| Sets the number of Non-Concurrent Constraint Checks associated with this message. | |
| void | setTime (long time) |
| Set the time stamp of this message. | |
| void | addDelay (long delay) |
| Add a delay to this message. | |
| void | setDestination (Object destination) |
| Set the destination of this message. | |
| void | setDestinations (Collection< Object > destinations) |
| Set the destination of this message. | |
| void | setMessageCounter (int messageCounter) |
| Sets the message counter. | |
| int | getMessageCounter () |
| String | toString () |
Private Attributes | |
| Message | message |
| The message being wrapped. | |
| long | ncccs = -1 |
| Used to count Non-Concurrent Constraint Checks; -1 if we do not need to count them. | |
| long | timeStamp = Long.MIN_VALUE |
| Used to store the time stamp of this message. | |
| Collection< Object > | destinations |
| Contains the IDs of the destinations of this message. | |
| int | messageCounter = 0 |
| Every queue has a message counter that counts the number of messages sent; this field contains the value of that counter at the time the message was sent. | |
Message wrapper, used to store information on.
| frodo2.communication.MessageWrapper.MessageWrapper | ( | Message | message | ) |
| frodo2.communication.MessageWrapper.MessageWrapper | ( | Message | message, |
| long | ncccs, | ||
| long | timeStamp, | ||
| Collection< Object > | destinations, | ||
| int | messageCounter ) |
Constructor.
| message | the message |
| ncccs | the NCCC counter |
| timeStamp | the timestamp |
| destinations | the destinations |
| messageCounter | the message counter |
References destinations, message, messageCounter, ncccs, and timeStamp.
| void frodo2.communication.MessageWrapper.addDelay | ( | long | delay | ) |
Add a delay to this message.
| delay | the delay to be added (in nanoseconds) |
Referenced by frodo2.communication.mailer.CentralMailer.execute().
| Object frodo2.communication.MessageWrapper.getDestination | ( | ) |
References destinations.
| Collection< Object > frodo2.communication.MessageWrapper.getDestinations | ( | ) |
References destinations.
Referenced by frodo2.communication.mailer.CentralMailer.FakeQueue.cleanQueue(), and frodo2.communication.mailer.CentralMailer.execute().
| Message frodo2.communication.MessageWrapper.getMessage | ( | ) |
Referenced by frodo2.communication.mailer.CentralMailer.execute(), frodo2.communication.sharedMemory.QueueIOPipe.pushMessage(), frodo2.communication.tcp.QueueOutputPipeTCP.pushMessage(), frodo2.communication.mailer.CentralMailer.run(), and frodo2.communication.QueueTest.testSendToMultiple().
| int frodo2.communication.MessageWrapper.getMessageCounter | ( | ) |
Referenced by frodo2.communication.mailer.CentralMailer.TimestampComparator.compare().
| long frodo2.communication.MessageWrapper.getNCCCs | ( | ) |
Referenced by frodo2.communication.mailer.CentralMailer.run(), and frodo2.communication.Queue.run().
| long frodo2.communication.MessageWrapper.getTime | ( | ) |
Referenced by frodo2.communication.mailer.CentralMailer.TimestampComparator.compare(), frodo2.communication.mailer.CentralMailer.execute(), frodo2.communication.mailer.tests.testCentralMailer.notifyIn(), and frodo2.communication.mailer.CentralMailer.run().
| void frodo2.communication.MessageWrapper.setDestination | ( | Object | destination | ) |
Set the destination of this message.
| destination | the destination of this message |
Referenced by frodo2.communication.mailer.CentralMailer.FakeQueue.sendMessage(), frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeries(), frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesMultiple(), frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesSerialized(), and frodo2.communication.mailer.tests.testCentralMailer.testNext().
| void frodo2.communication.MessageWrapper.setDestinations | ( | Collection< Object > | destinations | ) |
Set the destination of this message.
| destinations | the destinations of this message |
References destinations.
| void frodo2.communication.MessageWrapper.setMessageCounter | ( | int | messageCounter | ) |
Sets the message counter.
| messageCounter | the messageCounter of the queue sending the message |
References messageCounter.
| void frodo2.communication.MessageWrapper.setNCCCs | ( | long | ncccs | ) |
Sets the number of Non-Concurrent Constraint Checks associated with this message.
| ncccs | the number of NCCCs |
References ncccs.
| void frodo2.communication.MessageWrapper.setTime | ( | long | time | ) |
Set the time stamp of this message.
| time | the time stamp (in nanoseconds) |
Referenced by frodo2.communication.mailer.CentralMailer.FakeQueue.sendMessageToMulti(), frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesMultiple(), and frodo2.communication.mailer.tests.testCentralMailer.testNext().
| String frodo2.communication.MessageWrapper.toString | ( | ) |
References message.
|
private |
Contains the IDs of the destinations of this message.
Referenced by getDestination(), getDestinations(), MessageWrapper(), and setDestinations().
|
private |
The message being wrapped.
Referenced by MessageWrapper(), MessageWrapper(), and toString().
|
private |
Every queue has a message counter that counts the number of messages sent; this field contains the value of that counter at the time the message was sent.
Referenced by MessageWrapper(), and setMessageCounter().
|
private |
Used to count Non-Concurrent Constraint Checks; -1 if we do not need to count them.
Referenced by MessageWrapper(), and setNCCCs().
|
private |
Used to store the time stamp of this message.
Referenced by MessageWrapper().