GridSim 5.0 beta

gridsim.parallel.reservation
Class FilterARMessage

Object
  extended by Sim_predicate
      extended by FilterARMessage

public class FilterARMessage
extends Sim_predicate

This filter is used to look for a specific incoming event that matches a given event tag name and a reservation id. Incoming events with a matching tag name must contain a data object of type ReservationMessage which stores the reservation and consequently has the given reservation ID.

NOTE: This class can only be used for getting a reply or feedback from a ParallelResource entity regarding to an advance reservation.
This class is used by Sim_system to select or filter an event already present in the entity's deferred queue (incoming buffer), or used to selectively wait for a future event.

Since:
5.0
Author:
Marcos Dias de Assuncao
See Also:
ReservationRequester

Constructor Summary
FilterARMessage(int reservId, int tag)
          Finds an incoming events that matches with the given reservation ID and event tag name.
 
Method Summary
 boolean match(Sim_event ev)
          Checks whether an event matches the required constraints or not.
NOTE: This method is not used directly by the user.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterARMessage

public FilterARMessage(int reservId,
                       int tag)
Finds an incoming events that matches with the given reservation ID and event tag name.

Parameters:
reservId - the id of the reservation to which the message is related
tag - a matching event tag name
Method Detail

match

public boolean match(Sim_event ev)
Checks whether an event matches the required constraints or not.
NOTE: This method is not used directly by the user. Instead, it is called by Sim_system.

Specified by:
match in class Sim_predicate
Parameters:
ev - an incoming event to compare with
Returns:
true if an event matches, false otherwise
Pre Condition:
ev != null
Post Condition:
$none

GridSim 5.0 beta

The University of Melbourne, Australia, 2009