FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.communication.MessageWrapper Class Reference

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.

Detailed Description

Message wrapper, used to store information on.

  • the nccc count
  • the time stamp
  • the set of destinations of the message
    Author
    Brammert Ottens, 26 aug 2009

Constructor & Destructor Documentation

◆ MessageWrapper() [1/2]

frodo2.communication.MessageWrapper.MessageWrapper ( Message message)

Constructor.

Parameters
messageto message to be wrapped

References message.

◆ MessageWrapper() [2/2]

frodo2.communication.MessageWrapper.MessageWrapper ( Message message,
long ncccs,
long timeStamp,
Collection< Object > destinations,
int messageCounter )

Constructor.

Parameters
messagethe message
ncccsthe NCCC counter
timeStampthe timestamp
destinationsthe destinations
messageCounterthe message counter

References destinations, message, messageCounter, ncccs, and timeStamp.

Member Function Documentation

◆ addDelay()

void frodo2.communication.MessageWrapper.addDelay ( long delay)

Add a delay to this message.

Author
Brammert Ottens, 1 sep 2009
Parameters
delaythe delay to be added (in nanoseconds)

Referenced by frodo2.communication.mailer.CentralMailer.execute().

◆ getDestination()

Object frodo2.communication.MessageWrapper.getDestination ( )
Returns
the first destination of this message

References destinations.

◆ getDestinations()

Collection< Object > frodo2.communication.MessageWrapper.getDestinations ( )

◆ getMessage()

◆ getMessageCounter()

int frodo2.communication.MessageWrapper.getMessageCounter ( )
Author
Brammert Ottens, 6 nov 2009
Returns
the message counter of this message

Referenced by frodo2.communication.mailer.CentralMailer.TimestampComparator.compare().

◆ getNCCCs()

long frodo2.communication.MessageWrapper.getNCCCs ( )
Returns
the number of Non-Concurrent Constraint Checks associated with this message; -1 if we haven't been counting them

Referenced by frodo2.communication.mailer.CentralMailer.run(), and frodo2.communication.Queue.run().

◆ getTime()

◆ setDestination()

◆ setDestinations()

void frodo2.communication.MessageWrapper.setDestinations ( Collection< Object > destinations)

Set the destination of this message.

Author
Brammert Ottens, 11 jun 2009
Parameters
destinationsthe destinations of this message

References destinations.

◆ setMessageCounter()

void frodo2.communication.MessageWrapper.setMessageCounter ( int messageCounter)

Sets the message counter.

Author
Brammert Ottens, 6 nov 2009
Parameters
messageCounterthe messageCounter of the queue sending the message

References messageCounter.

◆ setNCCCs()

void frodo2.communication.MessageWrapper.setNCCCs ( long ncccs)

Sets the number of Non-Concurrent Constraint Checks associated with this message.

Parameters
ncccsthe number of NCCCs

References ncccs.

◆ setTime()

void frodo2.communication.MessageWrapper.setTime ( long time)

Set the time stamp of this message.

Author
Brammert Ottens, 11 jun 2009
Parameters
timethe time stamp (in nanoseconds)

Referenced by frodo2.communication.mailer.CentralMailer.FakeQueue.sendMessageToMulti(), frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesMultiple(), and frodo2.communication.mailer.tests.testCentralMailer.testNext().

◆ toString()

String frodo2.communication.MessageWrapper.toString ( )
See also
java.lang.Object#toString()

References message.

Member Data Documentation

◆ destinations

Collection<Object> frodo2.communication.MessageWrapper.destinations
private

Contains the IDs of the destinations of this message.

Referenced by getDestination(), getDestinations(), MessageWrapper(), and setDestinations().

◆ message

Message frodo2.communication.MessageWrapper.message
private

The message being wrapped.

Referenced by MessageWrapper(), MessageWrapper(), and toString().

◆ messageCounter

int frodo2.communication.MessageWrapper.messageCounter = 0
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().

◆ ncccs

long frodo2.communication.MessageWrapper.ncccs = -1
private

Used to count Non-Concurrent Constraint Checks; -1 if we do not need to count them.

Referenced by MessageWrapper(), and setNCCCs().

◆ timeStamp

long frodo2.communication.MessageWrapper.timeStamp = Long.MIN_VALUE
private

Used to store the time stamp of this message.

Referenced by MessageWrapper().


The documentation for this class was generated from the following file: