planet.symphony
Class SymphonyProperties

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

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
static java.lang.String DEFAULT_F
          Symphony property: Default key for maximum number of members in successor list.
static java.lang.String DEFAULT_K
          Symphony property: Default key for maximum number of long distance connections.
static java.lang.String DEFAULT_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 DEFAULT_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 DEFAULT_STABILIZE_STEPS
          Symphony property: Default key for number of stabilize steps.
 int F
          Maximum number of members in successor list.
 int K
          Maximum number of long distance connections.
 int maxJoinRetries
          Maximum number of retries to enter to the network by the same bootstrap.
 int maxRetriesNewLongDistance
          Maximum number of retries to obtain a connection to the same long distance node.
 int stabilizeSteps
          Number of steps for statibilization.
 
Constructor Summary
SymphonyProperties()
           
 
Method Summary
 int getTypeForApplicationMessage()
          Returns RouteMessage type for Application level.
 void init(java.lang.String propertiesFile)
          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.
 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

DEFAULT_K

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

See Also:
Constant Field Values

DEFAULT_F

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

See Also:
Constant Field Values

DEFAULT_MAX_RETRIES_NEW_LONG_DISTANCE

public static final java.lang.String DEFAULT_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

DEFAULT_MAX_JOIN_RETRIES

public static final java.lang.String DEFAULT_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

DEFAULT_STABILIZE_STEPS

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

See Also:
Constant Field Values

K

public int K
Maximum number of long distance connections.


F

public int F
Maximum number of members in successor list.


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(java.lang.String propertiesFile)
          throws InitializationException
Initialize all configuration properties of the Symphony overlay.

Specified by:
init in interface PropertiesInitializer
Parameters:
propertiesFile -
Throws:
InitializationException
See Also:
PropertiesInitializer.init(java.lang.String)

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.