Class UnicastTestRpc

java.lang.Object
org.jgroups.tests.UnicastTestRpc
All Implemented Interfaces:
Receiver

public class UnicastTestRpc extends Object implements Receiver
Tests performance of unicast RPCs between a caller and a recipient
  • Field Details

    • channel

      private JChannel channel
    • local_addr

      private Address local_addr
    • disp

      private RpcDispatcher disp
    • groupname

      private 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 Collection<Address> anycast_mbrs
    • destination

      private Address destination
    • RECEIVE

      private static final Method RECEIVE
    • METHODS

      private static final Method[] METHODS
    • num_requests

      protected final AtomicInteger num_requests
  • Constructor Details

    • UnicastTestRpc

      public UnicastTestRpc()
  • Method Details

    • init

      public void init(String props, String name, String cluster_name) throws Exception
      Throws:
      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 Throwable
      Throws:
      Throwable
    • invokeRpcs

      void invokeRpcs() throws Throwable
      Throws:
      Throwable
    • setSenderThreads

      void setSenderThreads() throws Exception
      Throws:
      Exception
    • setNumMessages

      void setNumMessages() throws Exception
      Throws:
      Exception
    • setMessageSize

      void setMessageSize() throws Exception
      Throws:
      Exception
    • setAnycastCount

      void setAnycastCount() throws Exception
      Throws:
      Exception
    • populateAnycastList

      void populateAnycastList(View view)
    • printView

      void printView()
    • getReceiver

      private Address getReceiver()
    • getSites

      protected static List<String> getSites(JChannel channel)
    • main

      public static void main(String[] args)
    • help

      static void help()