Package com.globalmentor.io
Class AsynchronousWriter.Consumer
- java.lang.Object
-
- com.globalmentor.io.AsynchronousWriter.Consumer
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- AsynchronousWriter
protected class AsynchronousWriter.Consumer extends java.lang.Object implements java.lang.Runnable
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
Constructors Modifier Constructor Description protected
Consumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
The main functionality of the consumer, which consumes data from the blocking queue and writes it to the underlying writer.
-
-
-
Method Detail
-
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.- Specified by:
run
in interfacejava.lang.Runnable
-
-