Package org.sim0mq.test.threads
Class PushPullThreads
- java.lang.Object
-
- org.sim0mq.test.threads.PushPullThreads
-
public class PushPullThreads extends Object
Play with three event producing threads that need to send their message via a shared method to a receiving thread that is listening. The PUSH-PULL over the inproc protocol with a synchronized send method is used to implement this. Messages are sent without waiting to not block the sending threads. Therefore, the HWM is set considerably higher to not lose any messages. A map of thread id to socket is used to create one socket per sending thread.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version 30 Apr 2020
BSD-style license. See Sim0MQ License.- Author:
- Alexander Verbraeck
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
PushPullThreads.ConsumerThread
(package private) class
PushPullThreads.ProducerThread
-
Constructor Summary
Constructors Constructor Description PushPullThreads()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(String message)
Process message and push to central thread.static void
main(String[] args)
-