Package org.jgroups.tests
Class UnicastTest
- java.lang.Object
-
- org.jgroups.tests.UnicastTest
-
public class UnicastTest extends java.lang.ObjectPerf tests the UNICAST protocol by sending unicast messages between a sender and a receiver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classUnicastTest.MyReceiverprotected classUnicastTest.Sender
-
Field Summary
Fields Modifier and Type Field Description protected JChannelchannelprotected static byteDATAprotected booleandont_bundleprotected intmsg_sizeprotected intnum_msgsprotected intnum_threadsprotected booleanoobprotected UnicastTest.MyReceiverreceiverprotected longsleep_timeprotected static byteSTART
-
Constructor Summary
Constructors Constructor Description UnicastTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconnect()protected voiddisconnect()voideventLoop()protected AddressgetReceiver()(package private) static voidhelp()voidinit(java.lang.String props, long sleep_time, java.lang.String name)static voidmain(java.lang.String[] args)protected voidprintConnections()(package private) voidprintView()protected voidremoveAllConnections()(package private) voidsendMessages()(package private) voidsetMessageSize()(package private) voidsetNumMessages()(package private) voidsetSenderThreads()
-
-
-
Field Detail
-
channel
protected JChannel channel
-
receiver
protected final UnicastTest.MyReceiver receiver
-
sleep_time
protected long sleep_time
-
oob
protected boolean oob
-
dont_bundle
protected boolean dont_bundle
-
num_threads
protected int num_threads
-
num_msgs
protected int num_msgs
-
msg_size
protected int msg_size
-
START
protected static final byte START
- See Also:
- Constant Field Values
-
DATA
protected static final byte DATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(java.lang.String props, long sleep_time, java.lang.String name) throws java.lang.Exception- Throws:
java.lang.Exception
-
connect
protected void connect() throws java.lang.Exception- Throws:
java.lang.Exception
-
disconnect
protected void disconnect()
-
eventLoop
public void eventLoop() throws java.lang.Exception- Throws:
java.lang.Exception
-
printConnections
protected void printConnections()
-
removeAllConnections
protected void removeAllConnections()
-
sendMessages
void sendMessages() throws java.lang.Exception- Throws:
java.lang.Exception
-
setSenderThreads
void setSenderThreads() throws java.lang.Exception- Throws:
java.lang.Exception
-
setNumMessages
void setNumMessages() throws java.lang.Exception- Throws:
java.lang.Exception
-
setMessageSize
void setMessageSize() throws java.lang.Exception- Throws:
java.lang.Exception
-
printView
void printView()
-
getReceiver
protected Address getReceiver()
-
main
public static void main(java.lang.String[] args)
-
help
static void help()
-
-