edu.byu.ece.edif.tools.replicate.nmr.dwc
Class DWCReplicationType

java.lang.Object
  extended by edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
      extended by edu.byu.ece.edif.tools.replicate.nmr.dwc.DWCReplicationType
All Implemented Interfaces:
ReplicationType, java.io.Serializable

public class DWCReplicationType
extends AbstractReplicationType

The DWC replication type performs duplication. It doesn't of itself insert detectors. That must be accomplished using an appropriate DetectionType. This class only takes care of the actual replication.

See Also:
Serialized Form

Field Summary
protected static DWCReplicationType _instance
           
protected static java.lang.String[] DWC_SUFFIXES
           
 
Fields inherited from class edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
_replicationFactor, _replicationName
 
Constructor Summary
private DWCReplicationType()
           
 
Method Summary
 java.util.List<OrganSpecification> antiRestore(EdifNet net, ReplicationDescription desc)
          Give a list of organ specifications to implement a "force_no_restore" on the net.
 java.util.List<OrganSpecification> defaultRestore(EdifNet net, ReplicationDescription desc)
          Give a list of organ specifications to implement the default restoration for the given net.
 java.util.List<OrganSpecification> forceRestore(EdifNet net, java.util.List<EdifPortRef> forceRestoreRefs, java.util.Collection<OrganSpecification> prevSpecs, ReplicationDescription desc)
          Give a list of organ specifications to implement a forced restoration on the given net.
 java.util.List<OrganSpecification> forceRestore(EdifNet net, java.util.List<EdifPortRef> forceRestoreRefs, ReplicationDescription desc)
          Give a list of organ specifications to implement a forced restoration on the given net.
static DWCReplicationType getInstance()
           
protected  java.lang.String getReplicationSuffix(int domain)
          Create a new String to be added to the end of a triplicated element that incorporates the NMR domain number.
private  java.lang.Object readResolve()
          This method ensures that during deserialization, the _instance variable will be referred to and possibly modified so that extra instances (more than necessary) don't get created.
 
Methods inherited from class edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
getReplicationFactor, getReplicationInstanceNameable, getReplicationNetNameable, getReplicationPortNameable, getReplicationString, replicate, replicate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DWC_SUFFIXES

protected static java.lang.String[] DWC_SUFFIXES

_instance

protected static DWCReplicationType _instance
Constructor Detail

DWCReplicationType

private DWCReplicationType()
Method Detail

getInstance

public static DWCReplicationType getInstance()

getReplicationSuffix

protected java.lang.String getReplicationSuffix(int domain)
Create a new String to be added to the end of a triplicated element that incorporates the NMR domain number.

Overrides:
getReplicationSuffix in class AbstractReplicationType
Parameters:
domain - The domain number
Returns:
the String with the replication suffix and domain number.

antiRestore

public java.util.List<OrganSpecification> antiRestore(EdifNet net,
                                                      ReplicationDescription desc)
Description copied from interface: ReplicationType
Give a list of organ specifications to implement a "force_no_restore" on the net. Generally, this will just be null because not restoring doesn't require doing anything. This method exists solely so that the replication type can know about anit_restore locations just in case it needs to for some project later on.

Returns:

defaultRestore

public java.util.List<OrganSpecification> defaultRestore(EdifNet net,
                                                         ReplicationDescription desc)
Description copied from interface: ReplicationType
Give a list of organ specifications to implement the default restoration for the given net. A default restoration is any restoration needed as a consequence of a scale down or up in replication factor (i.e. a triplicated partition feeds into a duplicated partition).

Returns:

forceRestore

public java.util.List<OrganSpecification> forceRestore(EdifNet net,
                                                       java.util.List<EdifPortRef> forceRestoreRefs,
                                                       ReplicationDescription desc)
Description copied from interface: ReplicationType
Give a list of organ specifications to implement a forced restoration on the given net.

Returns:

forceRestore

public java.util.List<OrganSpecification> forceRestore(EdifNet net,
                                                       java.util.List<EdifPortRef> forceRestoreRefs,
                                                       java.util.Collection<OrganSpecification> prevSpecs,
                                                       ReplicationDescription desc)
Description copied from interface: ReplicationType
Give a list of organ specifications to implement a forced restoration on the given net. This version of the method checks to see if any of prevSpecs can be reused.

Returns:

readResolve

private java.lang.Object readResolve()
                              throws java.io.ObjectStreamException
This method ensures that during deserialization, the _instance variable will be referred to and possibly modified so that extra instances (more than necessary) don't get created.

Returns:
Throws:
java.io.ObjectStreamException