Class UnicastTestTcpRpc


  • public class UnicastTestTcpRpc
    extends java.lang.Object
    Tests the UNICAST by invoking unicast RPCs between a sender and a receiver
    • Field Detail

      • srv_sock

        private java.net.ServerSocket srv_sock
      • sock

        private volatile java.net.Socket sock
      • sock_in

        private java.io.DataInputStream sock_in
      • sock_out

        private java.io.DataOutputStream sock_out
      • sleep_time

        private long sleep_time
      • exit_on_end

        private boolean exit_on_end
      • busy_sleep

        private boolean busy_sleep
      • sync

        private boolean sync
      • oob

        private boolean oob
      • num_threads

        private int num_threads
      • num_msgs

        private int num_msgs
      • msg_size

        private int msg_size
      • addr

        private java.net.InetAddress addr
      • local_port

        private int local_port
      • dest_port

        private int dest_port
      • started

        private boolean started
      • start

        private long start
      • stop

        private long stop
      • current_value

        private java.util.concurrent.atomic.AtomicInteger current_value
      • num_values

        private int num_values
      • print

        private int print
      • total_bytes

        private java.util.concurrent.atomic.AtomicLong total_bytes
      • acceptor

        private java.lang.Thread acceptor
      • buf

        private final byte[] buf
      • total_req_time

        long total_req_time
      • total_rsp_time

        long total_rsp_time
      • entire_req_time

        long entire_req_time
      • num_entire_reqs

        long num_entire_reqs
      • num_reqs

        int num_reqs
      • num_rsps

        int num_rsps
    • Constructor Detail

      • UnicastTestTcpRpc

        public UnicastTestTcpRpc()
    • Method Detail

      • init

        public void init​(long sleep_time,
                         boolean exit_on_end,
                         boolean busy_sleep,
                         boolean sync,
                         boolean oob,
                         java.lang.String addr,
                         int local_port,
                         int dest_port)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createSocket

        void createSocket()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • handleRequest

        boolean handleRequest​(java.io.DataInputStream in,
                              java.io.DataOutputStream out)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        static void set​(java.net.Socket socket)
                 throws java.net.SocketException
        Throws:
        java.net.SocketException
      • stop

        void stop()
      • startTest

        public void startTest​(int num_values)
      • receiveData

        public void receiveData​(long value,
                                byte[] buffer)
      • 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
      • main

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

        static void help()