GridSim 5.0 beta

gridsim.net.fnb
Class FnbWhiteList

Object
  extended by AbstractCollection<E>
      extended by AbstractList<E>
          extended by ArrayList
              extended by FnbWhiteList
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess

public class FnbWhiteList
extends ArrayList

This class stores a (white) list of entity IDs, such that their messages are guaranteed not to be dropped in the network.

Since:
GridSim Toolkit 4.2
Author:
Agustin Caminero
See Also:
Serialized Form

Field Summary
 
Fields inherited from class AbstractList
modCount
 
Method Summary
 boolean addEntityID(int id)
          Adds this entity ID to the white list.
 boolean addEntityID(Integer id)
          Adds this entity ID to the white list.
 boolean checkList(int id)
          Returns true if the given id is in the white list.
static FnbWhiteList getInstance()
          Returns an instance of this white list.
 boolean removeID(int id)
          Removes the given entity id from the white list.
 
Methods inherited from class ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Method Detail

getInstance

public static FnbWhiteList getInstance()
Returns an instance of this white list.

Returns:
an instance of this white list.

checkList

public boolean checkList(int id)
Returns true if the given id is in the white list.

Parameters:
id - an entity id
Returns:
true if the given id is in the white list, false otherwise.

addEntityID

public boolean addEntityID(Integer id)
Adds this entity ID to the white list. Note that this method also adds the IDs of Input and Output ports associated with this entity ID.

Parameters:
id - an entity ID
Returns:
true if the entity ID has been added to the white list, false otherwise.
See Also:
Input, Output

addEntityID

public boolean addEntityID(int id)
Adds this entity ID to the white list. Note that this method also adds the IDs of Input and Output ports associated with this entity ID.

Parameters:
id - an entity ID
Returns:
true if the entity ID has been added to the white list, false otherwise.
See Also:
Input, Output

removeID

public boolean removeID(int id)
Removes the given entity id from the white list.

Parameters:
id - the entity id to be removed from the white list
Returns:
true if the entity has been removed successfully, false otherwise.

GridSim 5.0 beta

The University of Melbourne, Australia, 2009