Cisco Systems, Inc.

com.pcube.apps.engage.common
Class BWController

java.lang.Object
  extended by com.pcube.apps.engage.foundations.NamedObjectBase
      extended by com.pcube.apps.engage.common.BWController
All Implemented Interfaces:
Formattable, com.pcube.apps.framework.commons.NamedObject, java.io.Serializable, java.lang.Cloneable

public class BWController
extends com.pcube.apps.engage.foundations.NamedObjectBase
implements java.io.Serializable, java.lang.Cloneable, Formattable

A bandwidth controller has two values - the minimum bandwidth which the bandwidth controller is obligated to supply (CIR) and the bandwidth limitation (PIR). A service's transactions can be associated to a BWController. The platform makes sure that the total BW consumed by all the flows linked to a specific BWController does not exceed its PIR, and attempts to balance traffic consumption, such that all subscribers will at least receive their CIR value. The probability of bandwidth being less that the PIR depends on the assigned Class-Of-Service & Assurance-Level assigned to a transaction.
A BWController is a part of a BWControllerArray, and is in its context. The total BWController is the first BWController in the BWControllerArray. All flows which are not controlled by any specific BWController, have their bandwidth accumulated into the total BWController.

See Also:
Serialized Form

Field Summary
static long BWCONTROLLER_BW_STEP
           
static long DEFAULT_CIR
           
static int DOWNSTREAM_DIRECTION
           
static long MAX_BWCONTROLLER_BW
           
static long MAX_BWCONTROLLER_BW_8K
           
static long MIN_BWCONTROLLER_BW
           
static long REAL_MAX_BWCONTROLLER_BW_8K_IN_SE
           
static long REAL_MAX_BWCONTROLLER_BW_IN_SE
           
static int TOTAL_BW_LIMIT_INDEX
           
static int UPSTREAM_DIRECTION
           
 
Constructor Summary
BWController()
           
BWController(java.lang.String name)
           
BWController(java.lang.String newName, boolean isSubBWController, long cir, long pir, int dir)
           
BWController(java.lang.String newName, java.lang.String newDescription)
          Deprecated. use BWController(String)instead.
BWController(java.lang.String newName, java.lang.String newDescription, boolean isSubBWController, long cir, long pir, int dir)
          Deprecated. use BWController(String, boolean, long, long, int) instead.
 
Method Summary
 java.lang.Object clone()
          Producing an identical object to this object.
 void fromStream(java.io.BufferedReader in, Formatter f)
          Method fromStream
 AssuranceLevel getAssuranceLevel()
          Gets this bandwidth controller assurance level.
 long getCIR()
          Gets the bandwidth in Kbps which this BWController is obligated to supply.
 int getDirection()
          Gets this bandwidth controller's direction.
 int getGlobalControllerIndex()
          Gets this bandwidth controller quality params' global controller index
 long getPIR()
          Gets this bandwidth controller's bandwidth limitation in Kbps.
 boolean isAddOnPackage()
           
 boolean isDefaultBWC()
          This will return true if the bwc is a default bwc
 boolean isIsSubBWController()
          Deprecated. use isSubBWController
 boolean isSubBWController()
          Checks if the bandwidth which is controlled by this BWController will be accumulated by the total BWController as well.
 void setAssuranceLevel(AssuranceLevel assuranceLevel)
          Sets this bandwidth controller assurance level.
 void setAssuranceLevel(int newAssuranceLevel)
          Sets this bandwidth controller assurance level.
 void setCIR(long newCIR)
          Sets this BWController's CIR
 void setDirection(int newDirection)
          Sets this bandwidth controller's direction.
 void setGlobalControllerIndex(int newGlobalControllerIndex)
          Sets the bw Limiter index.
 void setIsAddOnPackage(boolean isAddOnPackage)
           
 void setIsDefaultBWC(boolean isDefaultBWC)
          This method will set true for default bwc, which will be used for package combo
 void setIsSubBWController(boolean newIsSubBWController)
          Sets the flag which decides if the bandwidth which is controlled by this BWController will be accumulated by the total BWController as well.
 void setPIR(long newPIR)
          Sets this bandwidth controller's bandwidth limitation
 void setValueFrom(BWController other)
          Sets the value of this BWController to resemble another BWController
 void toStream(java.io.PrintStream out, Formatter f)
          Method toStream
 
Methods inherited from class com.pcube.apps.engage.foundations.NamedObjectBase
addPropertyChangedListener, addVetoableChangeListener, getName, removePropertyChangedListener, removeVetoableChangeListener, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BWCONTROLLER_BW_STEP

public static final long BWCONTROLLER_BW_STEP
See Also:
Constant Field Values

DEFAULT_CIR

public static final long DEFAULT_CIR
See Also:
Constant Field Values

DOWNSTREAM_DIRECTION

public static final int DOWNSTREAM_DIRECTION
See Also:
Constant Field Values

MAX_BWCONTROLLER_BW_8K

public static final long MAX_BWCONTROLLER_BW_8K
See Also:
Constant Field Values

MAX_BWCONTROLLER_BW

public static final long MAX_BWCONTROLLER_BW
See Also:
Constant Field Values

MIN_BWCONTROLLER_BW

public static final long MIN_BWCONTROLLER_BW
See Also:
Constant Field Values

REAL_MAX_BWCONTROLLER_BW_8K_IN_SE

public static final long REAL_MAX_BWCONTROLLER_BW_8K_IN_SE
See Also:
Constant Field Values

REAL_MAX_BWCONTROLLER_BW_IN_SE

public static final long REAL_MAX_BWCONTROLLER_BW_IN_SE
See Also:
Constant Field Values

TOTAL_BW_LIMIT_INDEX

public static final int TOTAL_BW_LIMIT_INDEX
See Also:
Constant Field Values

UPSTREAM_DIRECTION

public static final int UPSTREAM_DIRECTION
See Also:
Constant Field Values
Constructor Detail

BWController

public BWController()

BWController

public BWController(java.lang.String name)
Parameters:
name -

BWController

public BWController(java.lang.String newName,
                    boolean isSubBWController,
                    long cir,
                    long pir,
                    int dir)

BWController

public BWController(java.lang.String newName,
                    java.lang.String newDescription)
Deprecated. use BWController(String)instead.

BWController Constructor.

Parameters:
newName - this BWController's name
newDescription - this BWController's description

BWController

public BWController(java.lang.String newName,
                    java.lang.String newDescription,
                    boolean isSubBWController,
                    long cir,
                    long pir,
                    int dir)
Deprecated. use BWController(String, boolean, long, long, int) instead.

BWController Constructor.

Parameters:
newName - this BWController's name
newDescription - this BWController's description
isSubBWController - this BWController's flag stating if the bandwidth controlled by it will be accumulated in the total BWController as well
cir - this BWController's CIR value
pir - this BWController's PIR value
dir - this BWController's direction
Method Detail

clone

public java.lang.Object clone()
Producing an identical object to this object.

Overrides:
clone in class java.lang.Object
Returns:
a newly alocated object similar to this object.

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
Description copied from interface: Formattable
Method fromStream

Specified by:
fromStream in interface Formattable
Throws:
ImportExportException
See Also:
Formattable.fromStream(java.io.BufferedReader, com.pcube.apps.engage.common.Formatter)

getAssuranceLevel

public AssuranceLevel getAssuranceLevel()
Gets this bandwidth controller assurance level.

Returns:
this quality of service's assurance level
See Also:
#ASSURANCE_LEVEL_HIGH, #ASSURANCE_LEVEL_MEDIUM, #ASSURANCE_LEVEL_LOW

getCIR

public long getCIR()
Gets the bandwidth in Kbps which this BWController is obligated to supply.

Returns:
the CIR value

getDirection

public int getDirection()
Gets this bandwidth controller's direction.

Returns:
the direction
See Also:
UPSTREAM_DIRECTION, DOWNSTREAM_DIRECTION

getGlobalControllerIndex

public int getGlobalControllerIndex()
Gets this bandwidth controller quality params' global controller index

Returns:
this bandwidth controller quality params' global controller index

getPIR

public long getPIR()
Gets this bandwidth controller's bandwidth limitation in Kbps.

Returns:
the PIR value

isIsSubBWController

public boolean isIsSubBWController()
Deprecated. use isSubBWController

Checks if the bandwidth which is controlled by this BWController will be accumulated by the total BWController as well. The total BWController is the first BWController in the BWControllerArray this BWController belongs to.

Returns:
true if this BWController is a sub BWController, false otherwise

setIsDefaultBWC

public void setIsDefaultBWC(boolean isDefaultBWC)
This method will set true for default bwc, which will be used for package combo

Parameters:
isDefaultBWC -

isDefaultBWC

public boolean isDefaultBWC()
This will return true if the bwc is a default bwc

Returns:

isSubBWController

public boolean isSubBWController()
Checks if the bandwidth which is controlled by this BWController will be accumulated by the total BWController as well. The total BWController is the first BWController in the BWControllerArray this BWController belongs to.

Returns:
true if this BWController is a sub BWController, false otherwise

setAssuranceLevel

public void setAssuranceLevel(AssuranceLevel assuranceLevel)
Sets this bandwidth controller assurance level.

Parameters:
newAssuranceLevel - the new assurance level
See Also:
#ASSURANCE_LEVEL_HIGH, #ASSURANCE_LEVEL_MEDIUM, #ASSURANCE_LEVEL_LOW

setAssuranceLevel

public void setAssuranceLevel(int newAssuranceLevel)
Sets this bandwidth controller assurance level.

Parameters:
newAssuranceLevel - the new assurance level
See Also:
#ASSURANCE_LEVEL_HIGH, #ASSURANCE_LEVEL_MEDIUM, #ASSURANCE_LEVEL_LOW

setCIR

public void setCIR(long newCIR)
Sets this BWController's CIR

Parameters:
newCIR -

setDirection

public void setDirection(int newDirection)
Sets this bandwidth controller's direction.

Parameters:
newDirection - the direction
See Also:
UPSTREAM_DIRECTION, DOWNSTREAM_DIRECTION

setGlobalControllerIndex

public void setGlobalControllerIndex(int newGlobalControllerIndex)
Sets the bw Limiter index.

Parameters:
newGlobalControllerIndex - the new BW limiter index

setIsSubBWController

public void setIsSubBWController(boolean newIsSubBWController)
Sets the flag which decides if the bandwidth which is controlled by this BWController will be accumulated by the total BWController as well. The total BWController is the first BWController in the BWControllerArray this BWController belongs to.

Parameters:
newIsSubBWController -

setPIR

public void setPIR(long newPIR)
Sets this bandwidth controller's bandwidth limitation

Parameters:
newPIR - the PIR value in Kbps

setValueFrom

public void setValueFrom(BWController other)
                  throws java.beans.PropertyVetoException
Sets the value of this BWController to resemble another BWController

Parameters:
other -
Throws:
java.beans.PropertyVetoException

setIsAddOnPackage

public void setIsAddOnPackage(boolean isAddOnPackage)

isAddOnPackage

public boolean isAddOnPackage()

toStream

public void toStream(java.io.PrintStream out,
                     Formatter f)
Description copied from interface: Formattable
Method toStream

Specified by:
toStream in interface Formattable
See Also:
Formattable.toStream(java.io.PrintStream, com.pcube.apps.engage.common.Formatter)

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.