Package org.apache.pulsar.testclient
Class LoadSimulationClient
- java.lang.Object
-
- org.apache.pulsar.testclient.LoadSimulationClient
-
public class LoadSimulationClient extends java.lang.ObjectLoadSimulationClient is used to simulate client load by maintaining producers and consumers for topics. Instances of this class are controlled across a network via LoadSimulationController.
-
-
Field Summary
Fields Modifier and Type Field Description static byteCHANGE_COMMANDstatic byteCHANGE_GROUP_COMMANDstatic byteFIND_COMMANDstatic byteSTOP_COMMANDstatic byteSTOP_GROUP_COMMANDstatic byteTRADE_COMMAND
-
Constructor Summary
Constructors Constructor Description LoadSimulationClient(org.apache.pulsar.testclient.LoadSimulationClient.MainArguments arguments)Create a LoadSimulationClient with the given JCommander arguments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Start a client with command line arguments.voidrun()Start listening for controller commands to create producers and consumers.
-
-
-
Field Detail
-
CHANGE_COMMAND
public static final byte CHANGE_COMMAND
- See Also:
- Constant Field Values
-
STOP_COMMAND
public static final byte STOP_COMMAND
- See Also:
- Constant Field Values
-
TRADE_COMMAND
public static final byte TRADE_COMMAND
- See Also:
- Constant Field Values
-
CHANGE_GROUP_COMMAND
public static final byte CHANGE_GROUP_COMMAND
- See Also:
- Constant Field Values
-
STOP_GROUP_COMMAND
public static final byte STOP_GROUP_COMMAND
- See Also:
- Constant Field Values
-
FIND_COMMAND
public static final byte FIND_COMMAND
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LoadSimulationClient
public LoadSimulationClient(org.apache.pulsar.testclient.LoadSimulationClient.MainArguments arguments) throws java.lang.ExceptionCreate a LoadSimulationClient with the given JCommander arguments.- Parameters:
arguments- Arguments to configure this from.- Throws:
java.lang.Exception
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionStart a client with command line arguments.- Parameters:
args- Command line arguments to pass in.- Throws:
java.lang.Exception
-
run
public void run() throws java.lang.ExceptionStart listening for controller commands to create producers and consumers.- Throws:
java.lang.Exception
-
-