gov.nist.antd.merlin.protocol.protectionlink
Class BackupManager

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--gov.nist.antd.merlin.util.AbstractCallback
              |
              +--gov.nist.antd.merlin.protocol.protectionlink.BackupManager
All Implemented Interfaces:
Callback, com.renesys.raceway.DML.Configurable, DMLDump

public class BackupManager
extends AbstractCallback
implements DMLDump

This class represents an implementation of a restoration process. when a failure occured in a lamdba, it recomputes the algorithms to have a new path

 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
static java.lang.String backupAlgorithm
          The static name of algorithm to use for backup
private  LinkStateTable linkStateTable
          Table of link state information.
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
BackupManager()
          Constructor
 
Method Summary
 void callback(EventMessage eventMsg)
          This method implements the handler for the los of light detection.
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configuration
 void init()
          installs the link state table in the protocol.
 boolean isInputLambda(Lambda lambda, OpticalConnection route)
          Return true if the lambda is an in lambda
 void process(Lambda lambda)
          This method implements the handler for the los of light detection.
 boolean push(ProtocolMessage message, ProtocolSession fromSession)
          Print the message received.
 java.lang.String toDML()
          This method generates the DML representation of this class.
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

linkStateTable

private LinkStateTable linkStateTable
Table of link state information.

Since:
1.2

backupAlgorithm

public static java.lang.String backupAlgorithm
The static name of algorithm to use for backup

Constructor Detail

BackupManager

public BackupManager()
Constructor

Method Detail

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configuration

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class ProtocolSession
Parameters:
cfg - The DML configuration
Throws:
if - a configuration error occurs
com.renesys.raceway.DML.configException

callback

public void callback(EventMessage eventMsg)
This method implements the handler for the los of light detection. Recovery will only update the internal linkstate table.

Specified by:
callback in interface Callback
Specified by:
callback in class AbstractCallback
Parameters:
eventMsg - The event that occured.

process

public void process(Lambda lambda)
This method implements the handler for the los of light detection.

Parameters:
lambda - The failed lambda that is affected. The failure can be real or logical.
Since:
1.2

push

public boolean push(ProtocolMessage message,
                    ProtocolSession fromSession)
             throws ProtocolException
Print the message received.

Specified by:
push in class AbstractCallback
Parameters:
message - The message received.
fromSession - The protocol session which sent the message.
Returns:
True if the message is pushed. False if it is dropped.
Throws:
ProtocolException - If a protocol session exception occurs.

isInputLambda

public boolean isInputLambda(Lambda lambda,
                             OpticalConnection route)
Return true if the lambda is an in lambda

Parameters:
lambda - The Lambda to check
route - The OpticalConnection that contains the lambda
Returns:
true if the lambda is an input lambda

init

public void init()
          throws ProtocolException
installs the link state table in the protocol.

Overrides:
init in class AbstractCallback
Throws:
ProtocolException - If an exception occurs.
Since:
1.2

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