Class UnicastTestRpc

  • All Implemented Interfaces:
    Receiver

    public class UnicastTestRpc
    extends java.lang.Object
    implements Receiver
    Tests performance of unicast RPCs between a caller and a recipient
    • Field Detail

      • local_addr

        private Address local_addr
      • groupname

        private java.lang.String groupname
      • sync

        private boolean sync
      • oob

        private boolean oob
      • anycasting

        private boolean anycasting
      • num_threads

        private int num_threads
      • num_msgs

        private int num_msgs
      • msg_size

        private int msg_size
      • print

        private int print
      • anycast_count

        private int anycast_count
      • anycast_mbrs

        private final java.util.Collection<Address> anycast_mbrs
      • destination

        private Address destination
      • RECEIVE

        private static final java.lang.reflect.Method RECEIVE
      • METHODS

        private static final java.lang.reflect.Method[] METHODS
      • num_requests

        protected final java.util.concurrent.atomic.AtomicInteger num_requests
    • Constructor Detail

      • UnicastTestRpc

        public UnicastTestRpc()
    • Method Detail

      • init

        public void init​(java.lang.String props,
                         java.lang.String name,
                         java.lang.String cluster_name)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stop

        void stop()
      • receiveData

        public static void receiveData​(byte[] data)
      • viewAccepted

        public void viewAccepted​(View new_view)
        Description copied from interface: Receiver
        Called 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:
        viewAccepted in interface Receiver
      • eventLoop

        public void eventLoop()
                       throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • invokeRpcs

        void invokeRpcs()
                 throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • 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
      • setAnycastCount

        void setAnycastCount()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • populateAnycastList

        void populateAnycastList​(View view)
      • printView

        void printView()
      • getReceiver

        private Address getReceiver()
      • getSites

        protected static java.util.List<java.lang.String> getSites​(JChannel channel)
      • main

        public static void main​(java.lang.String[] args)
      • help

        static void help()