milvus/cpp/src/db/scheduler/SearchScheduler.h
groot 22b5b6cbf1 pipeline for loading/searching
Former-commit-id: 93cd16549fcd392de487237df21e2df14ef8321a
2019-06-04 19:32:43 +08:00

41 lines
870 B
C++

/*******************************************************************************
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
******************************************************************************/
#pragma once
#include "SearchContext.h"
#include "utils/ThreadPool.h"
namespace zilliz {
namespace vecwise {
namespace engine {
class SearchScheduler {
private:
SearchScheduler();
virtual ~SearchScheduler();
public:
static SearchScheduler& GetInstance();
bool ScheduleSearchTask(SearchContextPtr& search_context);
private:
bool Start();
bool Stop();
bool IndexLoadWorker();
bool SearchWorker();
private:
server::ThreadPool thread_pool_;
bool stopped_ = true;
};
}
}
}