org.nuiton.topia.replication.model
Class Link

java.lang.Object
  extended by org.nuiton.topia.replication.model.Link

public class Link
extends Object

Pour definir un lien entre deux entites (deux noeuds de replication).

Author:
chemit

Field Summary
protected  boolean association
           
protected  String name
           
protected  Set<ReplicationNode> requires
           
protected  ReplicationNode source
           
protected  ReplicationNode target
           
 
Constructor Summary
Link(ReplicationNode source, ReplicationNode target, String name, boolean association)
           
 
Method Summary
 boolean canReattach(Set<ReplicationNode> universe, ReplicationNode currentNode)
          Teste si on peut reattacher le lien en connaissant l'univers des noeuds disponibles.
 String getName()
           
 ReplicationNode getSource()
           
 ReplicationNode getTarget()
           
 boolean isAssociation()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected final ReplicationNode source

requires

protected final Set<ReplicationNode> requires

target

protected final ReplicationNode target

name

protected final String name

association

protected final boolean association
Constructor Detail

Link

public Link(ReplicationNode source,
            ReplicationNode target,
            String name,
            boolean association)
Method Detail

getName

public String getName()

getSource

public ReplicationNode getSource()

getTarget

public ReplicationNode getTarget()

isAssociation

public boolean isAssociation()

canReattach

public boolean canReattach(Set<ReplicationNode> universe,
                           ReplicationNode currentNode)
Teste si on peut reattacher le lien en connaissant l'univers des noeuds disponibles. On teste si toutes les pre-requis sont disponibles. Si oui, on peut reattacher.

Parameters:
universe - l'univers des noeuds disponibles
currentNode - le noeud qui vient d'etre replique
Returns:
true si on peut reattacher ce lien

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2010 CodeLutin. All Rights Reserved.