Class ProgrammaticUPerf2

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

public class ProgrammaticUPerf2 extends Object implements Receiver
Tests the UNICAST by invoking unicast RPCs between a sender and a receiver. Mimicks the DIST mode in Infinispan
  • Field Details

  • Constructor Details

    • ProgrammaticUPerf2

      public ProgrammaticUPerf2()
  • Method Details

    • getSync

      public static boolean getSync()
    • setSync

      public static void setSync(boolean s)
    • getOOB

      public static boolean getOOB()
    • setOOB

      public static void setOOB(boolean o)
    • getNumThreads

      public static int getNumThreads()
    • setNumThreads

      public static void setNumThreads(int t)
    • getTime

      public static int getTime()
    • setTime

      public static void setTime(int t)
    • getMsgSize

      public static int getMsgSize()
    • setMsgSize

      public static void setMsgSize(int t)
    • getAnycastCount

      public static int getAnycastCount()
    • setAnycastCount

      public static void setAnycastCount(int t)
    • getReadPercentage

      public static double getReadPercentage()
    • setReadPercentage

      public static void setReadPercentage(double r)
    • allowLocalGets

      public static boolean allowLocalGets()
    • allowLocalGets

      public static void allowLocalGets(boolean a)
    • printInvokers

      public static boolean printInvokers()
    • printInvokers

      public static void printInvokers(boolean p)
    • printDetails

      public static boolean printDetails()
    • printDetails

      public static void printDetails(boolean p)
    • init

      public void init(String name, String bind_addr, int bind_port) throws Exception
      Throws:
      Exception
    • stop

      static void stop()
    • startEventThread

      protected void startEventThread()
    • stopEventThread

      protected void stopEventThread()
    • viewAccepted

      public void viewAccepted(View v)
      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
    • invoke

      public static Object invoke(Object target, short method_id, Object[] args) throws Exception
      Throws:
      Exception
    • startTest

      public PerfUtil.Results startTest() throws Exception
      Throws:
      Exception
    • quitAll

      public void quitAll()
    • printAverage

      protected String printAverage(long start_time)
    • get

      public byte[] get(int key)
    • put

      public void put(int key, byte[] val)
    • getConfig

      public static PerfUtil.Config getConfig()
    • applyConfig

      protected static void applyConfig(PerfUtil.Config config)
    • eventLoop

      public void eventLoop()
    • invoke

      protected static void invoke(short method_id, Object... args) throws Exception
      Throws:
      Exception
    • startBenchmark

      protected void startBenchmark()
      Kicks off the benchmark on all cluster nodes
    • parseReadPercentage

      static double parseReadPercentage() throws Exception
      Throws:
      Exception
    • parseAnycastCount

      protected static int parseAnycastCount() throws Exception
      Throws:
      Exception
    • printView

      protected static void printView()
    • print

      protected static String print(AverageMinMax avg, boolean details)
    • main

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

      static void help()