planet.generic.commonapi.factory
Class Topology

java.lang.Object
  extended byplanet.generic.commonapi.factory.Topology

public class Topology
extends java.lang.Object

This class allow to the programmer specify all the topologies of the networks. Actually only exists three topologies:

Author:
Jordi Pujol
See Also:
Id

Field Summary
static java.lang.String CIRCULAR
          This topology specify that the Id of nodes are distributed uniformly in the ring.
static java.lang.String RANDOM
          This topology specify that the Id of nodes are distributed randomly.
static java.lang.String SERIALIZED
          This topology specify that the entire ring are restored from serialized state file.
 
Constructor Summary
Topology()
           
 
Method Summary
static boolean isValid(java.lang.String topology)
          Identify if the topology specified is valid or not.
static boolean isValidForNew(java.lang.String topology)
          Inform when the specified topology is valid to build new instances with sentence new.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RANDOM

public static final java.lang.String RANDOM
This topology specify that the Id of nodes are distributed randomly.

See Also:
Constant Field Values

CIRCULAR

public static final java.lang.String CIRCULAR
This topology specify that the Id of nodes are distributed uniformly in the ring.

See Also:
Constant Field Values

SERIALIZED

public static final java.lang.String SERIALIZED
This topology specify that the entire ring are restored from serialized state file.

See Also:
Constant Field Values
Constructor Detail

Topology

public Topology()
Method Detail

isValid

public static boolean isValid(java.lang.String topology)
Identify if the topology specified is valid or not.

Parameters:
topology - Topology to test if is valid.
Returns:
true if topology is valid. false in another case.

isValidForNew

public static boolean isValidForNew(java.lang.String topology)
Inform when the specified topology is valid to build new instances with sentence new. Actually, only the SERIALIZED topology is not valid.

Parameters:
topology - Topology to test.
Returns:
true if the topology is RANDOM or CIRCULAR. false in other case.


A> | METHOD