Class ExporterObjectProcessorJSON<T extends JSONable>

    • Field Detail

      • LOG

        protected static final org.apache.logging.log4j.Logger LOG
      • _jsonLines

        protected boolean _jsonLines
    • Constructor Detail

      • ExporterObjectProcessorJSON

        public ExporterObjectProcessorJSON​(java.io.Writer out,
                                           java.lang.String outName,
                                           long logFreq,
                                           boolean jsonLines)
      • ExporterObjectProcessorJSON

        public ExporterObjectProcessorJSON​(java.lang.String outFile,
                                           long logFreq,
                                           boolean jsonLines)
                                    throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
    • Method Detail

      • process

        public boolean process​(int count,
                               T obj)
                        throws java.lang.Exception
        Description copied from interface: ObjectProcessor
        Called for each record
        Parameters:
        count - the count of the object processed, starting at 0 for the first object processed.
        obj - the object processed.
        Returns:
        true if processing was successful and should continue, or false if processing was unsuccessful and should be aborted.
        Throws:
        java.lang.Exception
      • end

        public void end​(boolean hasMore,
                        int maxCount)
                 throws java.lang.Exception
        Description copied from interface: RecordProcessor
        Called after the last record has been processed successfully
        Specified by:
        end in interface ObjectProcessor<T extends JSONable>
        Specified by:
        end in interface RecordProcessor
        Overrides:
        end in class ExporterRecordProcessor
        Parameters:
        hasMore - whether there are more records to be processed
        maxCount - the max count originally supplied to the query handler
        Throws:
        java.lang.Exception