

#ifndef _ODS_JOBLOG_CONSUMER_H
#define _ODS_JOBLOG_CONSUMER_H

#include "condor_common.h"

// local includes
#include "ODSMongodbOps.h"

// condor includes
#include "ClassAdLogReader.h"


namespace plumage {
namespace etl {
        
class ODSJobLogConsumer: public ClassAdLogConsumer
{
public:
	ODSJobLogConsumer(const std::string& url);
	~ODSJobLogConsumer();

	void Reset();
	bool NewClassAd(const char *key,
					const char *type,
					const char *target);
	bool DestroyClassAd(const char *key);
	bool SetAttribute(const char *key,
					  const char *name,
					  const char *value);
	bool DeleteAttribute(const char *key,
						 const char *name);
    void SetJobLogReader(ClassAdLogReader *_reader) { m_reader = _reader; }


private:
    ClassAdLogReader *m_reader;
    ODSMongodbOps *m_history_db, *m_queue_db;
};

}}

#endif /* _ODS_JOBLOG_CONSUMER_H */
