edu.byu.ece.edif.tools.replicate.nmr
Class UnityReplicationType

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

public class UnityReplicationType
extends AbstractReplicationType

This class represents a one to one copy (not really a replication). This is used when partial replication is used and some design portions don't need to get replicated.

See Also:
Serialized Form

Field Summary
private static UnityReplicationType _instance
           
 
Fields inherited from class edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
_replicationFactor, _replicationName
 
Constructor Summary
private UnityReplicationType()
          Make sure the constructor is private so the only way to get an instance is to get the singleton instance from the getInstance() method.
 
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 UnityReplicationType getInstance()
          Get the singleton instance of the UnityReplicationType class.
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

_instance

private static UnityReplicationType _instance
Constructor Detail

UnityReplicationType

private UnityReplicationType()
Make sure the constructor is private so the only way to get an instance is to get the singleton instance from the getInstance() method.

Method Detail

getInstance

public static UnityReplicationType getInstance()
Get the singleton instance of the UnityReplicationType class.

Returns:

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