org.erights.e.elib.eio
Interface OutStream

All Superinterfaces:
Stream

public interface OutStream
extends Stream

Untamed: Places a sequence of elements into a stream.

A client of an OutStream is a producer.

Author:
Mark S. Miller

Method Summary
 void flush()
          Enabled: A flush() operation obligates all elements that have already entered the stream to eventually make progress except as limited by failure and backpressure.
 void write(ConstList elements)
          Enabled: Accepts elements as the immediate next ones in the stream.
 
Methods inherited from interface org.erights.e.elib.eio.Stream
available, closex, fail, getElementType, isTerminated, maxAvailable, terminatesx, whenAvailable
 

Method Detail

write

public void write(ConstList elements)
           throws UnavailableException,
                  IOException
Enabled: Accepts elements as the immediate next ones in the stream.

If this stream is already closed, an UnavailableException must be thrown.

If this stream has already failed, the terminal IOException must be thrown.

If the stream fails during the write, then some initial subsequence of the elements may be written in order, and the terminal IOException must be thrown.

If the stream doesn't fail

Parameters:
elements - The elements to place into the stream.
UnavailableException
IOException

flush

public void flush()
Enabled: A flush() operation obligates all elements that have already entered the stream to eventually make progress except as limited by failure and backpressure.

Exerts flush pressure on all prior elements of the stream. When streams are composed (for example, with pipes and filters), this obligation travels with the elements until they emerge from the plumbing.

A stream which exerts flush pressure on all elements that enter the stream is free to ignore flush(), or to treat it as a semantics-free suggestion to "hurry". This is indeed how the current implementation works.



comments?