Class RTT

java.lang.Object
org.jgroups.util.RTT

public class RTT extends Object
Measures round-trip times (RTT) between nodes
Since:
5.4, 5.3.8
  • Field Details

    • transport

      protected TP transport
    • tp_id

      protected short tp_id
    • enabled

      protected boolean enabled
    • num_reqs

      protected int num_reqs
    • timeout

      protected long timeout
    • size

      protected int size
    • oob

      protected boolean oob
    • rtts

      protected final Map<Address,AverageMinMax> rtts
    • times

      protected final Map<Address,long[]> times
  • Constructor Details

    • RTT

      public RTT()
  • Method Details

    • enabled

      public boolean enabled()
    • enabled

      public RTT enabled(boolean f)
    • numReqs

      public int numReqs()
    • numReqs

      public RTT numReqs(int n)
    • timeout

      public long timeout()
    • timeout

      public RTT timeout(long t)
    • size

      public int size()
    • size

      public RTT size(int size)
    • oob

      public boolean oob()
    • oob

      public RTT oob(boolean b)
    • init

      public void init(TP tp)
    • rtt

      public String rtt()
    • rtt

      public String rtt(int num_reqs, boolean details)
      Sends N requests to all members and computes RTTs
      Parameters:
      num_reqs - The number of requests to be sent to all members
      details - Whether to print details (e.g. min/max/percentiles)
    • rtt

      public String rtt(int num_reqs, int size, boolean details, boolean exclude_self)
      Sends N requests to all members and computes RTTs
      Parameters:
      num_reqs - The number of requests to be sent to all members
      size - The number of bytes a request should have
      details - Whether to print details (e.g. min/max/percentiles)
      exclude_self - Whether to exclude the local node
    • _rtt

      public Map<Address,AverageMinMax> _rtt(int num_reqs, int size, boolean exclude_self)
    • handleMessage

      public void handleMessage(Message msg, TpHeader hdr)
      Called when a message (request or response) is received
    • handleRequest

      protected void handleRequest(Address sender, TpHeader hdr)
    • handleResponse

      protected void handleResponse(Address sender, int index)
    • print

      protected static String print(AverageMinMax avg, boolean details, TimeUnit unit, int num_reqs)
    • percentiles

      protected static String percentiles(AverageMinMax avg, int num_reqs)