Package org.jgroups.tests
Class MessageDispatcherSpeedTest
java.lang.Object
org.jgroups.tests.MessageDispatcherSpeedTest
- All Implemented Interfaces:
RequestHandler,Receiver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProcesses a request synchronously, ie.(package private) static voidhelp()static void(package private) static voidprintStats(long total_time, int num) (package private) voidsendMessages(int num) voidstart()voidviewAccepted(View new_view) Called when a change in membership has occurred.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgroups.Receiver
block, getState, receive, receive, setState, unblockMethods inherited from interface org.jgroups.blocks.RequestHandler
handle
-
Field Details
-
channel
JChannel channel -
disp
MessageDispatcher disp -
props
String props -
server
boolean server -
num
int num -
received
int received -
TIMEOUT
static final long TIMEOUT- See Also:
-
-
Constructor Details
-
MessageDispatcherSpeedTest
-
-
Method Details
-
handle
Description copied from interface:RequestHandlerProcesses a request synchronously, ie. on the thread invoking this handler- Specified by:
handlein interfaceRequestHandler- Parameters:
msg- the message containing the request- Returns:
- the object, rceeived as result, or null (void method)
- Throws:
Exception
-
start
- Throws:
Exception
-
sendMessages
- Throws:
Exception
-
printStats
static void printStats(long total_time, int num) -
viewAccepted
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 when
JChannel.connect(String)returns.- Specified by:
viewAcceptedin interfaceReceiver
-
main
- Throws:
Exception
-
help
static void help()
-