org.modeshape.graph.request
Class CompositeRequestChannel

A channel for Request objects that can be submitted to a consumer (typically a RequestProcessor or
RepositoryConnection) while allowing the channel owner to continue adding more Request objects into the channel.

The owner of this channel is responsible for starting the processing using one of the two start(...) methods,
adding CompositeRequestChannel.ChannelCompositeRequests via add(...) methods, closing the channel when there are no more requests
to be added, and finally awaiting until all of the submitted requests have been processed. Note that the owner
can optionally pre-fill the channel with Request objects before calling start(...).

Because the CompositeRequest's iterator will block, the consumer will block while processing the request. Therefore, this
channel submits the CompositeRequest to the consumer asynchronously, via an ExecutorService supplied in one of the two
startmethods.

isClosed

cancel

public void cancel(boolean mayInterruptIfRunning)

Cancel this forked channel, stopping work as soon as possible. If the channel has not yet been started, this method

Parameters:

mayInterruptIfRunning - true if the channel is still being worked on, and the thread on which its being worked on may
be interrupted, or false if the channel should be allowed to finish if it is already in work.