All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class benno.submerge.Zone

java.lang.Object
   |
   +----benno.submerge.Zone

public class Zone
extends Object
implements Serializable
This is a zone of allocation. It consists of a list of networks provided by an upstream entities and then a list of allocations to downstream entities


Constructor Index

 o Zone(String)

Method Index

 o addDownstream(Network)
allocates network n in the downstream network.
 o addUpstream(Network)
 o countFree(int)
counts the free networks with a mask length of 'bits'
 o findFree(int)
Locates a free network with 'bits' network bits.
 o numAddrs()
sums the numAddrs for all of the upstream networks
 o optimiseFreestream()
This scans the freestream vector merging adjacent networks into supernets.
 o toString()

Constructors

 o Zone
 public Zone(String s)

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o addUpstream
 public void addUpstream(Network n)
 o addDownstream
 public void addDownstream(Network n)
allocates network n in the downstream network. As necessary, it splits up networks in the freestream to do this.

 o numAddrs
 public int numAddrs()
sums the numAddrs for all of the upstream networks

 o countFree
 public int countFree(int bits)
counts the free networks with a mask length of 'bits'

 o findFree
 public Network findFree(int bits)
Locates a free network with 'bits' network bits. Works by looking at all subnets of each upstream network, and testing to see if any downstream networks intersect.

 o optimiseFreestream
 public void optimiseFreestream()
This scans the freestream vector merging adjacent networks into supernets. The algorithm is: for each network in the freestream: check for the existence of a network with the last network bit flipped. if exists, replace both networks by a supernet 1-bit larger.


All Packages  Class Hierarchy  This Package  Previous  Next  Index