Class ShmTest


  • public class ShmTest
    extends java.lang.Object
    Tests the speed of message sending/receiving via shared memory. Start the server first, then the client. The server and client use a simple (and stupid) alternating bit protocol to rendezvous; this could be enhanced into a ring buffer to increase performance.
    Since:
    3.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int MAX_BUSY_SPIN  
      protected static int NUM  
      protected static int PRINT  
      protected static int SIZE  
    • Constructor Summary

      Constructors 
      Constructor Description
      ShmTest()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      protected static void start​(boolean server)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShmTest

        public ShmTest()
    • Method Detail

      • start

        protected static void start​(boolean server)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception