planet.dht
Class DHTProperties

java.lang.Object
  extended byplanet.dht.DHTProperties
All Implemented Interfaces:
DHTProperties, java.io.Serializable

public class DHTProperties
extends java.lang.Object
implements DHTProperties

This class includes the initialization and the values for all configuration properties of a generic DHT overlay.

Author:
Marc Sanchez Date: 12/08/2004
See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_REPLICATION_RATIO
          DHT property: Default key for number of replicas
static java.lang.String DEFAULT_REPLICATION_STAB
          DHT property: Default key for number of replicas
 int replicationRatio
          Number of replicas
 int replicationStabSteps
          Number of step to run replica's maintenance algorithm
 java.lang.String[] TYPES
           
 
Constructor Summary
DHTProperties()
           
 
Method Summary
 void init(java.lang.String propertiesFile)
          Initialize all configuration properties of a generic DHT application layer
 java.lang.String typeToString(int type)
          Returns a String representation of the constant specific values of type and mode of the RouteMessage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REPLICATION_RATIO

public static final java.lang.String DEFAULT_REPLICATION_RATIO
DHT property: Default key for number of replicas

See Also:
Constant Field Values

DEFAULT_REPLICATION_STAB

public static final java.lang.String DEFAULT_REPLICATION_STAB
DHT property: Default key for number of replicas

See Also:
Constant Field Values

TYPES

public java.lang.String[] TYPES

replicationRatio

public int replicationRatio
Number of replicas


replicationStabSteps

public int replicationStabSteps
Number of step to run replica's maintenance algorithm

Constructor Detail

DHTProperties

public DHTProperties()
Method Detail

init

public void init(java.lang.String propertiesFile)
          throws InitializationException
Initialize all configuration properties of a generic DHT application layer

Specified by:
init in interface DHTProperties
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 and mode of the RouteMessage. Its use is only for human readable logs.

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