Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Consumer

        protected Consumer()
    • 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. If AsynchronousWriter.FLUSH_INDICATOR is consumed, the underlying writer is flushed. If AsynchronousWriter.CLOSE_INDICATOR is consumed, the underlying writer is closed and the blocking queue is removed.
        Specified by:
        run in interface java.lang.Runnable