planet.symphony
Class SymphonyProperties

java.lang.Object
  extended byplanet.symphony.SymphonyProperties
All Implemented Interfaces:
OverlayProperties, PropertiesInitializer, java.io.Serializable

public class SymphonyProperties
extends java.lang.Object
implements OverlayProperties

This class includes the initialization and the values for all configuration properties of the Chord overlay.

Author:
Jordi Pujol, Marc Sanchez Date: 05/07/2004
See Also:
Serialized Form

Field Summary
 int maxJoinRetries
          Maximum number of retries to enter to the network by the same bootstrap.
 int maxLongDistance
          Maximum number of long distance connections (K).
 int maxRetriesNewLongDistance
          Maximum number of retries to obtain a connection to the same long distance node.
 int maxSuccessorList
          Maximum number of members in successor list (F).
 int stabilizeSteps
          Number of steps for statibilization.
static java.lang.String SYMPHONY_MAX_JOIN_RETRIES
          Symphony property: Default key for maximum number of retries to enter to the network by the same bootstrap.
static java.lang.String SYMPHONY_MAX_LONG_DISTANCE
          Symphony property: Default key for maximum number of long distance connections.
static java.lang.String SYMPHONY_MAX_RETRIES_NEW_LONG_DISTANCE
          Symphony property: Default key for maximum number of retries to obtain a connection to the same long distance node.
static java.lang.String SYMPHONY_MAX_SUCCESSOR_LIST
          Symphony property: Default key for maximum number of members in successor list.
static java.lang.String SYMPHONY_STABILIZATION_STEPS
          Symphony property: Default key for number of stabilize steps.
 
Constructor Summary
SymphonyProperties()
           
 
Method Summary
 int getTypeForApplicationMessage()
          Returns RouteMessage type for Application level.
 void init(PropertiesWrapper properties)
          Initialize all configuration properties of the Symphony overlay.
 java.lang.String modeToString(int mode)
          Returns a string representation of each of event mode and RouteMessage mode.
 void postinit(PropertiesWrapper properties)
          Makes the postinitialization process.
 java.lang.String typeToString(int type)
          Returns a String representation of the constant specific values of type the RouteMessage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYMPHONY_MAX_LONG_DISTANCE

public static final java.lang.String SYMPHONY_MAX_LONG_DISTANCE
Symphony property: Default key for maximum number of long distance connections.

See Also:
Constant Field Values

SYMPHONY_MAX_SUCCESSOR_LIST

public static final java.lang.String SYMPHONY_MAX_SUCCESSOR_LIST
Symphony property: Default key for maximum number of members in successor list.

See Also:
Constant Field Values

SYMPHONY_MAX_RETRIES_NEW_LONG_DISTANCE

public static final java.lang.String SYMPHONY_MAX_RETRIES_NEW_LONG_DISTANCE
Symphony property: Default key for maximum number of retries to obtain a connection to the same long distance node.

See Also:
Constant Field Values

SYMPHONY_MAX_JOIN_RETRIES

public static final java.lang.String SYMPHONY_MAX_JOIN_RETRIES
Symphony property: Default key for maximum number of retries to enter to the network by the same bootstrap.

See Also:
Constant Field Values

SYMPHONY_STABILIZATION_STEPS

public static final java.lang.String SYMPHONY_STABILIZATION_STEPS
Symphony property: Default key for number of stabilize steps.

See Also:
Constant Field Values

maxLongDistance

public int maxLongDistance
Maximum number of long distance connections (K).


maxSuccessorList

public int maxSuccessorList
Maximum number of members in successor list (F).


maxRetriesNewLongDistance

public int maxRetriesNewLongDistance
Maximum number of retries to obtain a connection to the same long distance node.


maxJoinRetries

public int maxJoinRetries
Maximum number of retries to enter to the network by the same bootstrap.


stabilizeSteps

public int stabilizeSteps
Number of steps for statibilization.

Constructor Detail

SymphonyProperties

public SymphonyProperties()
Method Detail

init

public void init(PropertiesWrapper properties)
          throws InitializationException
Initialize all configuration properties of the Symphony overlay.

Specified by:
init in interface PropertiesInitializer
Parameters:
properties - Properties with all (key,value) pairs.
Throws:
InitializationException
See Also:
PropertiesInitializer.init(planet.util.PropertiesWrapper)

postinit

public void postinit(PropertiesWrapper properties)
              throws InitializationException
Makes the postinitialization process. Does nothing.

Specified by:
postinit in interface PropertiesInitializer
Parameters:
properties - A Properties instance with all required configuration properties.
Throws:
InitializationException - if an error occurs during the initialization of the different properties.
See Also:
PropertiesInitializer.postinit(planet.util.PropertiesWrapper)

typeToString

public java.lang.String typeToString(int type)
Returns a String representation of the constant specific values of type the RouteMessage. Its use is only for human readable logs. Based on SymphonyNode implementation.

Specified by:
typeToString in interface OverlayProperties
Parameters:
type - Value to get its String representation.
Returns:
The String representation of the type.

modeToString

public java.lang.String modeToString(int mode)
Returns a string representation of each of event mode and RouteMessage mode.

Specified by:
modeToString in interface OverlayProperties
Parameters:
mode - Mode of the RouteMessage to get its String representation.
Returns:
String representation of the mode of RouteMessage.

getTypeForApplicationMessage

public int getTypeForApplicationMessage()
Returns RouteMessage type for Application level.

Specified by:
getTypeForApplicationMessage in interface OverlayProperties
Returns:
RouteMessage type for Application level.