fr.inria.peerunit.util
Class TesterUtil

java.lang.Object
  extended by fr.inria.peerunit.util.TesterUtil

public class TesterUtil
extends java.lang.Object

This class retrieve the application properties stocked in the properties file. These properties allow for instance to parameter the testing architecture type (centralized or distributed), the number of testers expected, etc.

Since:
1.0
Version:
1.3
Author:
Eduardo Almeida, Aboubakar Koïta, Veronique Pelleau, Jérémy Masson

Field Summary
static TesterUtil instance
           
 
Constructor Summary
TesterUtil(java.io.InputStream is)
           
TesterUtil(java.util.Properties p)
           
 
Method Summary
 java.lang.String getBootstrap()
          Return the peers's bootstrap address, may be different from tester's bootstrap one.
 int getBootstrapPort()
          Return the peers's bootstrap port, may be different from tester's bootstrap one.
 int getChurnPercentage()
          Return a percentage of peers's number that is used by some test cases for instance for choose the number of peers that join the test in first and those who join it in second.
 int getCoordinationType()
          Return the testing architecture type, centralized or distributed
 java.lang.String getDateformat()
          Return the date format used for logging.
 java.lang.String getDelimiter()
          Return the delimiter used for logging
 int getExpectedTesters()
          Return the number of testers expected in the properties file.
 java.lang.String getHostsFilePath()
          Return the value of the property that indicates the path of the file containing the tester's hosts addresses.
 java.lang.String getLogfile()
          Return the log file name
 java.lang.String getLogfolder()
          Return the application log file folder
 java.util.logging.Level getLogLevel()
          Return the value of the property that fix the application logging level.
 int getLoopToFail()
          Return the number of try of a test action.
 int getObjects()
          Return the number of object to put in the Open chord or FreePastry's DHT for the testing.
 int getPeerName()
          This method decrement for every call the number of testers expected in the properties file and return it, apart the first call where it initialize only and return it .
 int getPort()
          Return the coordinator or bootstrapper's port depending on the testing architecture is distributed or centralized.
 int getRegistryPort()
          This method return the Tester's Bootstrap addresses.
 int getRelaxIndex()
          Return the relaxation index used for fix the tolerance to inconclusive results.
 java.lang.String getServerAddr()
          This method return the Tester's Bootstrap addresses.
 int getSleep()
          Return the test actions inactivity time for the synchronization.
 int getStationTreeTrace()
          1 to show traces during the station tree building, 0 by default.
 java.lang.String getTimeformat()
          Return the time format used for logging
 int getTreeOrder()
          Return the BTree order, if we are in distributed architecture.
 int getTreeStrategy()
          Return the BTree strategy, if we are in distributed architecture.
 int getTreeWaitForMethod()
          Return the value of the property that fix in millisecond the treetester's a specific waiting time for the synchronization.
 int getWaitForMethod()
          Return in millisecond the tester's waiting time for the synchronization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final TesterUtil instance
Constructor Detail

TesterUtil

public TesterUtil(java.io.InputStream is)

TesterUtil

public TesterUtil(java.util.Properties p)
Method Detail

getExpectedTesters

public int getExpectedTesters()
Return the number of testers expected in the properties file.

Returns:
the number of testers expected in the properties file

getPeerName

public int getPeerName()
This method decrement for every call the number of testers expected in the properties file and return it, apart the first call where it initialize only and return it .

Returns:
the number of testers expected that is decremented before

getServerAddr

public java.lang.String getServerAddr()
This method return the Tester's Bootstrap addresses.

Returns:
a ip addresses

getLogfile

public java.lang.String getLogfile()
Return the log file name

Returns:
the log file name

getDateformat

public java.lang.String getDateformat()
Return the date format used for logging.

Returns:
the date format used for logging

getTimeformat

public java.lang.String getTimeformat()
Return the time format used for logging

Returns:
the time format used for logging

getDelimiter

public java.lang.String getDelimiter()
Return the delimiter used for logging

Returns:
the delimiter format used for logging

getLogfolder

public java.lang.String getLogfolder()
Return the application log file folder

Returns:
the application log file folder

getRelaxIndex

public int getRelaxIndex()
Return the relaxation index used for fix the tolerance to inconclusive results.

Returns:
the relaxation index used for fix the tolerance to inconclusive results

getPort

public int getPort()
Return the coordinator or bootstrapper's port depending on the testing architecture is distributed or centralized.

Returns:
the coordinator or bootstrapper's port depending on the testing architecture is distributed or centralized.

getObjects

public int getObjects()
Return the number of object to put in the Open chord or FreePastry's DHT for the testing.

Returns:
the relaxation index used for fix the tolerance to inconclusive results

getSleep

public int getSleep()
Return the test actions inactivity time for the synchronization.

Returns:
Return the test actions inactivity time for the synchronization

getBootstrap

public java.lang.String getBootstrap()
Return the peers's bootstrap address, may be different from tester's bootstrap one.

Returns:
the peers's bootstrap address, may be different from tester's bootstrap one

getBootstrapPort

public int getBootstrapPort()
Return the peers's bootstrap port, may be different from tester's bootstrap one.

Returns:
the peers's bootstrap port, may be different from tester's bootstrap one

getWaitForMethod

public int getWaitForMethod()
Return in millisecond the tester's waiting time for the synchronization.

Returns:
in millisecond the tester's waiting time for the synchronization

getLoopToFail

public int getLoopToFail()
Return the number of try of a test action.

Returns:
the number of try of a test action

getChurnPercentage

public int getChurnPercentage()
Return a percentage of peers's number that is used by some test cases for instance for choose the number of peers that join the test in first and those who join it in second.

Returns:
a percentage of peers's number that is used by some test cases for instance for choose the number of peers that join the test in first and those who join it in second.

getLogLevel

public java.util.logging.Level getLogLevel()
Return the value of the property that fix the application logging level.

Returns:
the property that fix the application logging level

getTreeOrder

public int getTreeOrder()
Return the BTree order, if we are in distributed architecture.

Returns:
the BTree order, if we are in distributed architecture

getTreeStrategy

public int getTreeStrategy()
Return the BTree strategy, if we are in distributed architecture.

Returns:
the BTree strategy, if we are in distributed architecture

getCoordinationType

public int getCoordinationType()
Return the testing architecture type, centralized or distributed

Returns:
the testing architecture type, centralized or distributed

getTreeWaitForMethod

public int getTreeWaitForMethod()
Return the value of the property that fix in millisecond the treetester's a specific waiting time for the synchronization.

Returns:
Return the value of the property that fix in millisecond the treetester's a specific waiting time for the synchronization.

getStationTreeTrace

public int getStationTreeTrace()
1 to show traces during the station tree building, 0 by default.

Returns:
the stationTreeTrace

getHostsFilePath

public java.lang.String getHostsFilePath()
Return the value of the property that indicates the path of the file containing the tester's hosts addresses.

Returns:
the path of the hosts file.

getRegistryPort

public int getRegistryPort()
This method return the Tester's Bootstrap addresses.

Returns:
the port for the rmi registry


Copyright © 2010. All Rights Reserved.