Package com.globalmentor.io
Class AsynchronousWriter.Consumer
java.lang.Object
com.globalmentor.io.AsynchronousWriter.Consumer
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AsynchronousWriter
The consumer runnable that writes data to the underlying writer. This runnable's interruption policy is to close the underlying writer and end execution.
- Author:
- Garret Wilson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
The main functionality of the consumer, which consumes data from the blocking queue and writes it to the underlying writer.
-
Constructor Details
-
Consumer
protected Consumer()
-
-
Method Details
-
run
public void run()The main functionality of the consumer, which consumes data from the blocking queue and writes it to the underlying writer. IfAsynchronousWriter.FLUSH_INDICATOR
is consumed, the underlying writer is flushed. IfAsynchronousWriter.CLOSE_INDICATOR
is consumed, the underlying writer is closed and the blocking queue is removed.
-