- All Implemented Interfaces:
CipReplyConsumer
public class CipBarrier
extends java.lang.Object
implements CipReplyConsumer
Provide a means for a Dummy CipRequest to complete successfully when
zero or more other CipRequests complete. The dummy request is expected
to *not* be sent anywhere.
Usage:
1) Create the barrier with the dummy CipRequest supplied to
the constructor.
2) Use the .waitFor() method to connect a subject request to
this barrier. (This barrier will be added as a callback to
that subject request.) This must happen *before* the subject
request is sent or executed if its result needs to be included
in the final statistics.
3) Repeat calls to .waitFor() for each additional subject request.
Previous subject requests may complete in parallel without loss.
4) Call the .start() method to enable the final result.
4a) If all subjects completed in parallel or synchronously, this
.start() method will synchronously deliver the CipReply to
the target (dummy) request.
4b) If any subject was outstanding when .start() was called, then
the target (dummy) request will receive its CipReply when the
last subject completes.
5) The final CipReply is always a success, but with two extra status
words containing the counts of subject successes and subject
failures, respectively.