Class UnicastTestTcp


  • public class UnicastTestTcp
    extends java.lang.Object
    Same as UnicastTest, but uses pure TCP instead of JGroups
    • Field Detail

      • oob

        protected boolean oob
      • dont_bundle

        protected boolean dont_bundle
      • num_threads

        protected int num_threads
      • num_msgs

        protected int num_msgs
      • msg_size

        protected int msg_size
      • local

        protected java.net.InetSocketAddress local
      • remote

        protected java.net.InetSocketAddress remote
      • sock

        protected java.net.Socket sock
      • output

        protected java.io.DataOutputStream output
      • output_lock

        protected final java.util.concurrent.locks.Lock output_lock
      • srv_sock

        protected java.net.ServerSocket srv_sock
      • start

        protected long start
      • stop

        protected long stop
      • total_time

        protected long total_time
      • msgs_per_sec

        protected long msgs_per_sec
      • print

        protected long print
      • current_value

        protected java.util.concurrent.atomic.AtomicLong current_value
      • total_bytes

        protected java.util.concurrent.atomic.AtomicLong total_bytes
    • Constructor Detail

      • UnicastTestTcp

        public UnicastTestTcp()
    • Method Detail

      • init

        public void init​(java.lang.String local_addr,
                         java.lang.String remote_addr,
                         int local_port,
                         int remote_port)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • eventLoop

        public void eventLoop()
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendMessages

        void sendMessages()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • 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()
      • receive

        public void receive​(Message msg)
      • writeMessage

        protected static final void writeMessage​(Message msg,
                                                 java.io.DataOutputStream out)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readMessage

        protected static final Message readMessage​(java.io.DataInput in)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception