gov.nist.antd.optical
Class ONICFailureModule

java.lang.Object
  |
  +--gov.nist.antd.optical.ONICFailureModule
All Implemented Interfaces:
DMLDump, FailureModule

public class ONICFailureModule
extends java.lang.Object
implements FailureModule, DMLDump

This Module implements the default failure and recovery notification mechanism of an ONIC.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil

Field Summary
private  boolean debug
          For debug purposes of this Module only (use in dml: debug true)
private static boolean DEBUG
          For debug purposes of all these MODULES (use in dml: DEBUG true).
private  boolean detectLambaFailure
          Indicated if lambda failure detection is enabled.
private  double fiberPropDelay
          The propagation delay of a fiber failure/recovery to the signaling protocol.
private  double lambdaPropDelay
          The propagation delay of a lambda failure/recovery to the signaling protocol.
private  java.util.Vector messages
          This vector contains the messages for this process.
private  ONIC onic
          The ONIC this module is assigned to.
 
Fields inherited from interface gov.nist.antd.ssf.FailureModule
DML_SECTION_NAME
 
Constructor Summary
ONICFailureModule()
           
 
Method Summary
 void assign(NIC onic)
          Assign the module to the passed onic.
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configures the failure module.
private  void debug(java.lang.String message)
          Generates the debug output.
protected  void fiberFailure(Fiber fiber)
          This method deals with a fiber failure.
protected  void fiberRecovery(Fiber fiber)
          This method deals with a fiber recovery.
 double getFiberPropDelay()
          Returns the propagation delay of fiber failures.
 double getLambdaPropDelay()
          Returns the propagation delay of lambda failures.
 boolean isDebug()
          Return if the DefaultFailureModule is in debug mode
 boolean isDetectLambdaFailure()
          Returns the lambda detection value.
private  boolean isOneAlive(FailureInformation[] fi)
          Checks if at least one component is still alive.
protected  void lambdaFailure(Lambda lambda)
          This method deals with a lambda failure.
protected  void lambdaRecovery(Lambda lambda)
          This method deals with a lambda recovery.
protected  void linkFailure(OpticalLink link)
          This method deals with a link failure.
protected  void linkRecovery(OpticalLink link)
          This method deals with a link recovery.
protected  void onicFailure(ONIC oppositeONIC)
          This method deals with a ONIC / Host failure.
protected  void onicRecovery(ONIC oppositeONIC)
          This method deals with a ONIC / Host recovery.
 EventMessage[] processFailure(FailureInformation component)
          This method processes the failure notification of the passed object.
 EventMessage[] processRecovery(FailureInformation component)
          This method processes the failure recovery notification of the passed object.
 void setDetectLambdaFailure(boolean newValue)
          Set the capability of failure detetion.
 void setFiberPropDelay(double seconds)
          Set the propagation delay for fiber failures and recovery in seconds.
 void setLambdaPropDelay(double seconds)
          Set the propagation delay for lambda failures and recovery in seconds.
 java.lang.String toDML()
          This method generates the DML representation of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static boolean DEBUG
For debug purposes of all these MODULES (use in dml: DEBUG true).


debug

private boolean debug
For debug purposes of this Module only (use in dml: debug true)


detectLambaFailure

private boolean detectLambaFailure
Indicated if lambda failure detection is enabled. (Default = true)


lambdaPropDelay

private double lambdaPropDelay
The propagation delay of a lambda failure/recovery to the signaling protocol. (Default 0.0 seconds)


fiberPropDelay

private double fiberPropDelay
The propagation delay of a fiber failure/recovery to the signaling protocol. . (Default 0.0 seconds)


onic

private ONIC onic
The ONIC this module is assigned to.


messages

private java.util.Vector messages
This vector contains the messages for this process. Each procedd method must clear this vector first.

Constructor Detail

ONICFailureModule

public ONICFailureModule()
Method Detail

debug

private void debug(java.lang.String message)
Generates the debug output.

Parameters:
message - The message that has to be printed.
Since:

assign

public void assign(NIC onic)
            throws IllegalAssignmentException
Assign the module to the passed onic.

Specified by:
assign in interface FailureModule
Parameters:
onic - The ONIC the implemented module is assigned to.
Throws:
java.lang.IllegalAccessException - if the ONIC is already set or the passed instance is from the type gov.nist.antd.optical.ONIC.
IllegalAssignmentException - if the NIC is already set.

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configures the failure module.

Specified by:
config in interface FailureModule
Parameters:
cfg - The configuration instance.
Throws:
com.renesys.raceway.DML.configException

setDetectLambdaFailure

public void setDetectLambdaFailure(boolean newValue)
Set the capability of failure detetion. the value specifies if lambda failure can be detected or not..

Parameters:
newValue - detect individual lambda failures.

isDetectLambdaFailure

public boolean isDetectLambdaFailure()
Returns the lambda detection value.

Returns:
true if the lambda failure detection is activated, otherwise false.

setLambdaPropDelay

public void setLambdaPropDelay(double seconds)
Set the propagation delay for lambda failures and recovery in seconds.

Parameters:
seconds - the propagation delay in seconds.

setFiberPropDelay

public void setFiberPropDelay(double seconds)
Set the propagation delay for fiber failures and recovery in seconds.

Parameters:
seconds - the propagation delay in seconds.

getLambdaPropDelay

public double getLambdaPropDelay()
Returns the propagation delay of lambda failures.

Returns:
the propagation delay of lambda failures in seconds.

getFiberPropDelay

public double getFiberPropDelay()
Returns the propagation delay of fiber failures.

Returns:
the propagation delay of fiber failures in seconds.

isDebug

public boolean isDebug()
Return if the DefaultFailureModule is in debug mode

Returns:
true if the DefaultFailureModule is in debug mode

processRecovery

public EventMessage[] processRecovery(FailureInformation component)
This method processes the failure recovery notification of the passed object. This method has to determine if the recovery process has to be started or not. This depends on the inDepthFailure of the passed Object if possible. The following components can contina the logical failure (inDepthFailure): OpticalLink, Fiber, and Lambda.

Specified by:
processRecovery in interface FailureModule
Parameters:
component - the component whose failure attribute was set to true.
Returns:
an array of messages that has to be send. If no message has to be send the array is empty.

processFailure

public EventMessage[] processFailure(FailureInformation component)
This method processes the failure notification of the passed object. This method has to take care about logical failures that are the result of this failure.

Example:
The last Lambda in a fiber fails. The result is a logical failure (inDepthFailure) of the Fiber.

Specified by:
processFailure in interface FailureModule
Parameters:
component - the component whose failure attribute was set to false.
Returns:
an array of messages that has to be send. If no message has to be send the array is empty.

toDML

public java.lang.String toDML()
This method generates the DML representation of this class.

Specified by:
toDML in interface DMLDump
Returns:
The DML configuration as String

isOneAlive

private boolean isOneAlive(FailureInformation[] fi)
Checks if at least one component is still alive. The process only checks isFailure().

Parameters:
fi - The failure information component.
Returns:
true if one component is is still alive.

onicFailure

protected void onicFailure(ONIC oppositeONIC)
This method deals with a ONIC / Host failure.

Parameters:
oppositeONIC - the affected ONIC

onicRecovery

protected void onicRecovery(ONIC oppositeONIC)
This method deals with a ONIC / Host recovery.

Parameters:
oppositeONIC - the recovered onic

linkFailure

protected void linkFailure(OpticalLink link)
This method deals with a link failure.

Parameters:
link - the affected OpticalLink

linkRecovery

protected void linkRecovery(OpticalLink link)
This method deals with a link recovery.

Parameters:
link - the recovered optical link

fiberFailure

protected void fiberFailure(Fiber fiber)
This method deals with a fiber failure. This fiber failure can be logical or a fiber cut.

Parameters:
fiber - the fiber that has to be checked

fiberRecovery

protected void fiberRecovery(Fiber fiber)
This method deals with a fiber recovery. This fiber recovery can be logical or a replaced fiber cut.

Parameters:
fiber - the recovered fiber

lambdaFailure

protected void lambdaFailure(Lambda lambda)
This method deals with a lambda failure. This lambda failure can be logical or a loss of color.

Parameters:
lambda - the affected Lambda

lambdaRecovery

protected void lambdaRecovery(Lambda lambda)
This method deals with a lambda recovery. This lambda recovery can be logical or replaced laser.

Parameters:
lambda - the recovered lambda