cz.zcu.fav.kiv.jsim.unsecure
Class UnsecureHead

java.lang.Object
  |
  +--cz.zcu.fav.kiv.jsim.JSimHead
        |
        +--cz.zcu.fav.kiv.jsim.unsecure.UnsecureHead
All Implemented Interfaces:
java.lang.Comparable, JSimDisplayable

public class UnsecureHead
extends JSimHead

UnsecureHead is an experimental class that you probably will not use at all. It is intended to be used in distributed simulation where simulation time rollbacks can occur. Therefore, head statistics must also be reverted sometimes, which is just what this class provides. You had better not use this class at all. If you do not use the new methods correctly, results of some statistical methods may be completely wrong. However, the basic functionality should work correctly.

Since:
J-Sim version 0.3.0
Version:
J-Sim version 0.3.0
Author:
Jarda KAČER

Field Summary
 
Fields inherited from class cz.zcu.fav.kiv.jsim.JSimHead
lastChange, myParent, noOfItemsRemoved, sumLwUntilLastChange, sumTwRemoved
 
Constructor Summary
UnsecureHead(java.lang.String name, JSimSimulation parent)
          Creates a new UnsecureHead queue belonging to a simulation and having a name.
 
Method Summary
 long getNoOfItemsRemoved()
          Returns the number of links already removed from the queue.
 double getSumLwUntilLastChange()
          Returns the sum of time spent by all links in the queue from its creation to its last change.
 double getSumTwRemoved()
          Returns the total time spent in the queue by all links already removed from the queue.
 void setNoOfItemsRemoved(long newValue)
          Changes the number of links already removed from the queue.
 void setSumLwUntilLastChange(double newValue)
          Changes the sum of time spent by all links in the queue from its creation to its last change.
 void setSumTWRemoved(double newValue)
          Changes the total time spent in the queue by all links already removed from the queue.
 
Methods inherited from class cz.zcu.fav.kiv.jsim.JSimHead
cardinal, clear, compareTo, createDetailedInfoWindow, decNoOfItems, empty, equals, first, getCurrentTime, getDetailedInformationArray, getFirstData, getFirstDataType, getHead, getLastData, getLastDataType, getLw, getName, getNumber, getObjectListItemDescription, getParent, getTail, getTw, getTwForAllLinks, hashCode, incNoOfItems, last, putAtHead, putAtTail, setHead, setTail, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnsecureHead

public UnsecureHead(java.lang.String name,
                    JSimSimulation parent)
             throws JSimInvalidParametersException,
                    JSimTooManyHeadsException
Creates a new UnsecureHead queue belonging to a simulation and having a name. The queue is initially empty.

Parameters:
name - The name of the queue.
parent - The parent simulation.
Throws:
JSimInvalidParametersException - This exception is thrown out if the parent simulation is null.
JSimTooManyHeadsException - This exception is thrown out if no other queue can be added to the simulation specified.
Method Detail

getNoOfItemsRemoved

public long getNoOfItemsRemoved()
Returns the number of links already removed from the queue.

Returns:
The number of links already removed from the queue.

setNoOfItemsRemoved

public void setNoOfItemsRemoved(long newValue)
Changes the number of links already removed from the queue. Use with care!

Parameters:
newValue - The new number of links already removed from the queue.

getSumTwRemoved

public double getSumTwRemoved()
Returns the total time spent in the queue by all links already removed from the queue.

Returns:
The total time spent in the queue by all links already removed from the queue.

setSumTWRemoved

public void setSumTWRemoved(double newValue)
Changes the total time spent in the queue by all links already removed from the queue. Use with care!

Parameters:
newValue - The new total time spent in the queue by all links already removed from the queue.

getSumLwUntilLastChange

public double getSumLwUntilLastChange()
Returns the sum of time spent by all links in the queue from its creation to its last change.

Returns:
The sum of time spent by all links in the queue from its creation to its last change.

setSumLwUntilLastChange

public void setSumLwUntilLastChange(double newValue)
Changes the sum of time spent by all links in the queue from its creation to its last change. Use with care!

Parameters:
newValue - The new sum of time spent by all links in the queue from its creation to its last change.


Copyright © 2000-2004 University of West Bohemia, FAV-KIV. All Rights Reserved. Build date 20040510.