Class RpcDispatcherBlocking

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

public class RpcDispatcherBlocking extends Object implements Receiver
Tests synchronous group RPCs. 2 main test cases:
  1. Member crashes during invocation of sync group RPC: start 3 instances (A, B,C), set the timeout to be 30 seconds. Then invoke a sync group RPC by A (press 's' in A's window). A,B and C should receive the RPC. Now kill C. After some time, A's method call should return and show A's and B's reply to be valid, while showing C's response marked as suspected.
  2. Member joins group during synchronous group RPC: start A and B with timeout=30000. Invoke a sync group RPC on A. Start C. A and B should not receive the view change before the group RPC has returned with A's and B's results. Therefore A and B should not wait for C's response, which would never be received because C never got the RPC in the first place. This would block A forever.
  • Field Details

  • Constructor Details

    • RpcDispatcherBlocking

      public RpcDispatcherBlocking(String props, long timeout)
  • Method Details

    • print

      public void print(int i) throws Exception
      Throws:
      Exception
    • 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
    • start

      public void start() throws Exception
      Throws:
      Exception
    • sendGroupRpc

      RspList sendGroupRpc() throws Exception
      Throws:
      Exception
    • main

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

      static void help()