Class ItemModelTransactionTest.ThreadSync

  • Enclosing class:
    ItemModelTransactionTest

    public static class ItemModelTransactionTest.ThreadSync
    extends java.lang.Object
    • Constructor Detail

      • ThreadSync

        public ThreadSync()
    • Method Detail

      • registerThread

        public void registerThread​(java.lang.Thread t)
        Registers a thread to allow orderly shutdown of testing threads via destroy().
      • destroy

        public boolean destroy()
      • createGate

        public ItemModelTransactionTest.Gate createGate​(java.lang.String key,
                                                        int parties)
        Creates a point that allows to ensure a specific number of threads have passed it.

        This sync point can only be used once!

      • createJoin

        public ItemModelTransactionTest.Join createJoin​(java.lang.String key,
                                                        int parties)
        Creates a sync point that causes a specific number of threads to pause until all of them have arrived. After that they are released all at once.

        This sync point may be used several times.