public class CalcStorm
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
logger_ |
private int |
nClient_ |
private int |
nQuery_ |
private ClientProfile |
profile_ |
private java.util.Random |
random_ |
private Calculator.SendMode |
sendMode_ |
Constructor and Description |
---|
CalcStorm(ClientProfile profile,
java.util.Random random,
int nClient,
int nQuery,
Calculator.SendMode sendMode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Main method.
|
void |
run()
Runs a lot of calculators at once all talking to each other.
|
static int |
runMain(java.lang.String[] args)
Does the work for the main method.
|
private final ClientProfile profile_
private final java.util.Random random_
private final int nClient_
private final int nQuery_
private final Calculator.SendMode sendMode_
private static final java.util.logging.Logger logger_
public CalcStorm(ClientProfile profile, java.util.Random random, int nClient, int nQuery, Calculator.SendMode sendMode)
profile
- hub connection factoryrandom
- random number generatornClient
- number of clients to runnQuery
- number of messages each client will sendsendMode
- delivery pattern for messagespublic void run() throws java.io.IOException
TestException
- if any tests failjava.io.IOException
public static int runMain(java.lang.String[] args) throws java.io.IOException
args
- command-line argumentsjava.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException