|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.gnutant.GnutantRequestGenerator
This class implements a generic request generator. To create a
request, the generator selects randomly (with uniform probability)
a resource from a resource set, creates a generic request for that
resource and assign it randomly to one of the nests included in the
peernet. The number of requests that are generated for each invocation
of method generateRequests
can be configured through
the NumberOfRequests
parameter.
Field Summary | |
static String |
EXPONENTIAL
If the Selection parameter assumes this value, resources are selected randomly (with exponential distribution) from the resource set. |
static String |
PAR_MEAN
String name of the parameter used to determine vary the mean of the keyword selection distribution. |
static String |
PAR_NUMBERREQUESTS
Parameter name used to read the number of requests to be generated |
static String |
PAR_SELECTION
String name of the parameter used to determine the type of selection you can use. |
static String |
UNIFORM
If the Selection parameter assumes this value, resources are selected randomly (with uniform distribution) from the resource set. |
Fields inherited from interface antsim.RequestGenerator |
NAME |
Constructor Summary | |
GnutantRequestGenerator(Factory factory,
String name)
Constructs a new generic request generator and reads parameter NumberOfRequests from the configuration files. |
Method Summary | |
void |
clear()
Restores the object to its initial state. |
void |
generateRequests()
Generates a set of requests in the specified P2P network. |
void |
init(ResourceSet resourceSet,
Peernet peernet,
ResponseMonitor monitor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String UNIFORM
public static final String EXPONENTIAL
public static final String PAR_NUMBERREQUESTS
public static final String PAR_SELECTION
public static final String PAR_MEAN
Constructor Detail |
public GnutantRequestGenerator(Factory factory, String name)
NumberOfRequests
from the configuration files.
Method Detail |
public void clear()
clear
in interface Clearable
public void init(ResourceSet resourceSet, Peernet peernet, ResponseMonitor monitor)
init
in interface RequestGenerator
public void generateRequests()
generateRequests
in interface RequestGenerator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |