Package org.jgroups.tests
Class RoundTripRpc
- java.lang.Object
-
- org.jgroups.tests.RoundTripRpc
-
- All Implemented Interfaces:
Receiver
public class RoundTripRpc extends java.lang.Object implements Receiver
Class that measure RTT for multicast messages between 2 cluster members. SeeRpcDispatcherSpeedTestfor RPCs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classRoundTripRpc.Invoker
-
Field Summary
Fields Modifier and Type Field Description protected JChannelchannelprotected booleandetailsprotected RpcDispatcherdispprotected booleandont_bundleprotected RoundTripRpc.Invoker[]invokersprotected intnum_msgsprotected intnum_sendersprotected booleanoobprotected static java.lang.reflect.MethodrequestMethod
-
Constructor Summary
Constructors Constructor Description RoundTripRpc()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidhelp()protected voidinvokeRequests()protected voidloop()static voidmain(java.lang.String[] args)protected static java.lang.Stringprint(AverageMinMax avg)static shortrequest(short id)protected voidstart(java.lang.String props, java.lang.String name)voidviewAccepted(View view)Called when a change in membership has occurred.
-
-
-
Field Detail
-
channel
protected JChannel channel
-
disp
protected RpcDispatcher disp
-
num_msgs
protected int num_msgs
-
num_senders
protected int num_senders
-
oob
protected boolean oob
-
dont_bundle
protected boolean dont_bundle
-
details
protected boolean details
-
invokers
protected RoundTripRpc.Invoker[] invokers
-
requestMethod
protected static final java.lang.reflect.Method requestMethod
-
-
Method Detail
-
start
protected void start(java.lang.String props, java.lang.String name) throws java.lang.Exception- Throws:
java.lang.Exception
-
request
public static short request(short id)
-
viewAccepted
public void viewAccepted(View view)
Description copied from interface:ReceiverCalled when a change in membership has occurred. No long running actions, sending of messages or anything that could block should be done in this callback. If some long running action needs to be performed, it should be done in a separate thread.
Note that on reception of the first view (a new member just joined), the channel will not yet be in the connected state. This only happens whenJChannel.connect(String)returns.- Specified by:
viewAcceptedin interfaceReceiver
-
loop
protected void loop()
-
invokeRequests
protected void invokeRequests() throws java.lang.Exception- Throws:
java.lang.Exception
-
print
protected static java.lang.String print(AverageMinMax avg)
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
help
private static void help()
-
-