cz.zcu.fav.kiv.jsim.hla
Interface JSimHLAHead

All Known Implementing Classes:
JSimHead, JSimHLARemoteHead

public interface JSimHLAHead

JSimHLAHead represents queue, which can be local or remote. Since HLA support was added to J-Sim, every queue in simulation can be either local or remote. JSimHLAHead provides methods with the same functionality for local and remote queues.

Author:
Stanislav Kozina
See Also:
JSimHead

Method Summary
 long cardinal()
          Returns the number of links in the queue.
 boolean empty()
          Tests whether the queue is empty.
 JSimLink first()
          Returns the first link in the queue.
 double getLw()
          Returns the mean length of the queue.
 double getTw()
          Returns the mean waiting time spent in the queue by all links already removed from the queue.
 double getTwForAllLinks()
          Returns the mean waiting time spent in the queue by all links ever inserted to the queue.
 JSimLink last()
          Returns the last link in the queue.
 

Method Detail

empty

public boolean empty()
Tests whether the queue is empty.

Returns:
True if the queue is empty, false otherwise.

cardinal

public long cardinal()
Returns the number of links in the queue.

Returns:
The number of links in the queue.

first

public JSimLink first()
Returns the first link in the queue.

Returns:
The first link in the queue if the queue is not empty, null otherwise.

last

public JSimLink last()
Returns the last link in the queue.

Returns:
The last link in the queue if the queue is not empty, null otherwise.

getLw

public double getLw()
Returns the mean length of the queue.

Returns:
The mean length of the queue or NaN.

getTw

public double getTw()
Returns the mean waiting time spent in the queue by all links already removed from the queue.

Returns:
The mean waiting time spent in the queue by all links already removed from the queue or NaN.

getTwForAllLinks

public double getTwForAllLinks()
Returns the mean waiting time spent in the queue by all links ever inserted to the queue.

Returns:
The mean waiting time spent in the queue by all links ever inserted to the queue or NaN.