GridSim
v3.1

eduni.simjava
Class Evqueue

Object
  extended byAbstractCollection
      extended byAbstractList
          extended byAbstractSequentialList
              extended byLinkedList
                  extended byeduni.simjava.Evqueue
All Implemented Interfaces:
Cloneable, Collection, List, Serializable

public class Evqueue
extends LinkedList

This class implements the event queue used by Sim_system.

The event queue is separated into two subqueues, the future queue and the deferred queue. Newly arrived events are added to the future queue while events that the receiving entity is unable to process are placed in the deferred queue. The current implementation uses a Vector to store the events received.

This class is used internally by Sim_system and should not be directly accessed.

Version:
0.1, 25 June 1995
Author:
Ross McNab
See Also:
Sim_system, Serialized Form

Field Summary
(package private)  double max_time
           
 
Fields inherited from class AbstractList
modCount
 
Constructor Summary
Evqueue()
          Allocates a new Evqueue object.
 
Method Summary
 void add_event(Sim_event new_event)
          Add a new event to the queue.
 Sim_event pop()
          Remove and return the event at the top of the queue.
 Sim_event top()
          Return the event at the top of the queue, without removing it.
 
Methods inherited from class LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class AbstractSequentialList
iterator
 
Methods inherited from class AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Field Detail

max_time

double max_time
Constructor Detail

Evqueue

public Evqueue()
Allocates a new Evqueue object.

Method Detail

pop

public Sim_event pop()
Remove and return the event at the top of the queue.

Returns:
The next event.

top

public Sim_event top()
Return the event at the top of the queue, without removing it.

Returns:
The next event.

add_event

public void add_event(Sim_event new_event)
Add a new event to the queue. Adding a new event to the queue preserves the temporal order of the events in the queue.

Parameters:
new_event - The event to be put on the queue.

GridSim
v3.1

The University of Melbourne, Australia, 2004