|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.net.DatagramTest
public class DatagramTest
Test for datagram communication.
Nested Class Summary | |
---|---|
static class |
DatagramTest.DatagramListener
|
static class |
DatagramTest.DatagramPublisher
The publisher test. |
static class |
DatagramTest.ListenerConfig
Holder for Listener configuration. |
protected static class |
DatagramTest.PacketTracker
Tracker of packet statistics for a single client. |
static class |
DatagramTest.PublisherConfig
Holder for Publisher configuration. |
protected static class |
DatagramTest.StartFlag
The start flag is used to allow a listener to control a inner process publisher. |
static class |
DatagramTest.TestConfiguration
Holder for Test configuration. |
Constructor Summary | |
---|---|
DatagramTest()
|
Method Summary | |
---|---|
static boolean |
checkProcessPacketBytes(int cbPacket,
int cProcessPacketBytes)
Check that the value for processPacketBytes is acceptable. |
static String |
computeThroughputMBPerSec(long cBytes,
long lDurationMs)
Compute throughput as megabytes per second. |
static String |
computeThroughputPacketsPerSec(int cPackets,
long lDurationMs)
Compute throughput as packets per second. |
protected static List |
extractSwitches(Collection colArg,
String[] asValidSwitch)
Search the supplied argument set for known switches, and extract them. |
static void |
main(String[] asArg)
Parse and validate the command-line parameters and run the test. |
protected static Object |
processCommand(Map mapCommands,
String sName)
Process a command from the command line arguments. |
protected static Object |
processCommand(Map mapCommands,
String sName,
Object oDefault)
Process a command from the command line arguments. |
protected static int |
processIntCommand(Map mapCommands,
String sName)
Process a required command from the command line arguments, where the value is to be interpreted as an integer. |
protected static int |
processIntCommand(Map mapCommands,
String sName,
int iDefault)
Process an optional command from the command line arguments, where the value is to be interpreted as an integer. |
protected static long |
processLongCommand(Map mapCommands,
String sName,
long lDefault)
Process an optional command from the command line arguments, where the value is to be interpreted as an long. |
protected static void |
showInstructions()
Display the command-line instructions. |
protected static InetSocketAddress |
translateAddress(String sAddr)
Convert an address:port string to an InetSocketAddress. |
Field Detail |
---|
public static final int MB
public static final String COMMAND_ADDR_LOCAL
public static final int DEFAULT_PORT
public static final String DEFAULT_IP_LOCAL
public static final String DEFAULT_ADDR_LOCAL
public static final String COMMAND_PACKET_SIZE
public static final int DEFAULT_PACKET_SIZE
public static final String COMMAND_PAYLOAD
public static final int DEFAULT_PAYLOAD
public static final String COMMAND_TX_RATE
public static final int DEFAULT_TX_RATE
public static final String COMMAND_PROCESS_BYTES
public static final int DEFAULT_PROCESS_BYTES
public static final String COMMAND_TX_PACKET_BUFFER_SIZE
public static final int DEFAULT_TX_PACKET_BUFFER_SIZE
public static final String COMMAND_RX_PACKET_BUFFER_SIZE
public static final int DEFAULT_RX_PACKET_BUFFER_SIZE
public static final String COMMAND_LOG
public static final String DEFAULT_LOG
public static final String COMMAND_REPORT_INTERVAL
public static final int DEFAULT_REPORT_INTERVAL
public static final String COMMAND_LOG_INTERVAL
public static final int DEFAULT_LOG_INTERVAL
public static final String COMMAND_TICK_INTERVAL
public static final int DEFAULT_TICK_INTERVAL
public static final String COMMAND_TX_ITERATIONS
public static final int DEFAULT_TX_ITERATIONS
public static final String COMMAND_TX_DURATION_MS
public static final long DEFAULT_TX_DURATION_MS
public static final String COMMAND_RX_TIMEOUT_MS
public static final int DEFAULT_RX_TIMEOUT_MS
public static final String[] VALID_COMMANDS
public static final String SWITCH_HELP
public static final String SWITCH_POLITE
public static final String SWITCH_RAND
public static final String[] VALID_SWITCHES
Constructor Detail |
---|
public DatagramTest()
Method Detail |
---|
public static void main(String[] asArg)
asArg
- an array of command line parametersshowInstructions()
protected static List extractSwitches(Collection colArg, String[] asValidSwitch)
colArg
- argument collection to parse, and remove switch fromasValidSwitch
- switches to look for
protected static Object processCommand(Map mapCommands, String sName) throws UnsupportedOperationException
mapCommands
- the map of command line argumentssName
- the name of the command to process
UnsupportedOperationException
- if a no value is availableprotected static Object processCommand(Map mapCommands, String sName, Object oDefault) throws UnsupportedOperationException
mapCommands
- the map of command line argumentssName
- the name of the command to processoDefault
- Specifies a default value
UnsupportedOperationException
protected static int processIntCommand(Map mapCommands, String sName, int iDefault) throws UnsupportedOperationException
mapCommands
- the map of command line argumentssName
- the name of the argument to processiDefault
- Specifies an default value
UnsupportedOperationException
protected static int processIntCommand(Map mapCommands, String sName) throws UnsupportedOperationException
mapCommands
- the map of command line argumentssName
- the name of the argument to process
UnsupportedOperationException
- if a no value is availableprotected static long processLongCommand(Map mapCommands, String sName, long lDefault) throws UnsupportedOperationException
mapCommands
- the map of command line argumentssName
- the name of the argument to processlDefault
- Specifies an default value
UnsupportedOperationException
protected static InetSocketAddress translateAddress(String sAddr) throws UnknownHostException
sAddr
- a legal address string
UnknownHostException
public static boolean checkProcessPacketBytes(int cbPacket, int cProcessPacketBytes)
cbPacket
- the packet sizecProcessPacketBytes
- the number of bytes to process from each packet
public static String computeThroughputMBPerSec(long cBytes, long lDurationMs)
cBytes
- the number of bytes transferedlDurationMs
- the time in milliseconds the transfer took
public static String computeThroughputPacketsPerSec(int cPackets, long lDurationMs)
cPackets
- the number of packets transferedlDurationMs
- the time in milliseconds the transfer took
protected static void showInstructions()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |