bcds.phison.io
Class ZoneInfo<V,E>

java.lang.Object
  extended by bcds.phison.io.ZoneInfo<V,E>

public class ZoneInfo<V,E>
extends java.lang.Object

Holds data about one zone or "cluster". This class should be regarded as a "struct" (all its data members are public).

Author:
Juan Segovia S.

Field Summary
 java.lang.String id
          The id of this zone.
 float link_mtbf
          The mean-time-between-failures of 1 km of link in this zone, expressed in hours.
 float link_mttr
          The mean-time-to-repair a link in this zone, expressed in hours.
 java.util.Set<E> links
          The set of links included in this zone (both directions of a link must always belong to the same zone).
 double node_avail
          The availability of a node in this zone.
 java.util.Set<V> nodes
          The set of nodes included in this zone.
 
Constructor Summary
ZoneInfo(java.lang.String id, double node_avail, float link_mtbf, float link_mttr)
          Creates a new ZoneInfo and initializes it with the received parameters.
ZoneInfo(java.lang.String new_id, ZoneInfo<V,E> b)
          Copy constructor.
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public final java.lang.String id
The id of this zone.


node_avail

public double node_avail
The availability of a node in this zone.


link_mtbf

public float link_mtbf
The mean-time-between-failures of 1 km of link in this zone, expressed in hours.


link_mttr

public float link_mttr
The mean-time-to-repair a link in this zone, expressed in hours.


nodes

public java.util.Set<V> nodes
The set of nodes included in this zone.


links

public java.util.Set<E> links
The set of links included in this zone (both directions of a link must always belong to the same zone). Inter-zone links may be attached to either zone, but this is a decision that must be taken the caller (must change the membership as needed).

Constructor Detail

ZoneInfo

public ZoneInfo(java.lang.String id,
                double node_avail,
                float link_mtbf,
                float link_mttr)
Creates a new ZoneInfo and initializes it with the received parameters.


ZoneInfo

public ZoneInfo(java.lang.String new_id,
                ZoneInfo<V,E> b)
Copy constructor. All data members are copied to the new instance, except for the id, which is set to new_id. Beware that this is a shallow copy constructor.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object