/********************************************************************
* This software is "commercial computer software" as defined in the *
* Federal Acquisition Regulations and is subject to BlackLynx       *
* Inc's standard End User License Agreement.                        *
*                                                                   *
* CONFIDENTIAL - All source code is the propriety and confidential  *
* information of BlackLynx Inc.                                     *
*                                                                   *
* Copyright 2022 BlackLynx Inc.                                     *
* Unpublished -- all rights reserved under the copyright laws       *
* of the United States.                                             *
********************************************************************/

#ifndef __BLACKLYNX_URING_EXECDRIVER_H__
#define __BLACKLYNX_URING_EXECDRIVER_H__

#include <cstdint>
#include <mutex>
#include <string>
#include <thread>
#include <vector>

#include "Chunk.h"
#include "ExecDriver.h"
#include "Utilities/ProtectedAndSynchronizedQueue.h"


namespace BlackLynx
{
namespace SearchLynx
{

class URingExecDriver : public ExecDriver
{
public:
    
    URingExecDriver(
        const std::string& inputFile,
        uint32_t numReaderThreads);
    
    ~URingExecDriver() override;
    
    void start() override;
    
private:
    
    void readerThreadBody(
        chunk_queue_t* inQueue,
        chunk_queue_t* outQueue) override;
    
};

}
}

#endif // __BLACKLYNX_URING_EXECDRIVER_H__