65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
/***************************************************************************
|
|
Replicationg 관련 Queue Pop Control class
|
|
-----------------------------------------
|
|
begin : 2010/03/31
|
|
copyright : (C) 2010 Solbox Inc.
|
|
author : storage dev team
|
|
email : storage.sd@solbox.com
|
|
version : 3.3
|
|
|
|
CopyRight(C) 2010 Solbox Inc. All Rights reserved.
|
|
Redistribution and use in source and binary forms, with or with out
|
|
modification, are not permitted in outside of Solbox Inc.
|
|
***************************************************************************/
|
|
|
|
#ifndef __REPLICATE_QUEUE_CONTROL_H__
|
|
#define __REPLICATE_QUEUE_CONTROL_H__
|
|
|
|
#include <list>
|
|
|
|
#include "DataQueue.hpp"
|
|
#include "ReplicationData.h"
|
|
#include "ReportLog.h"
|
|
|
|
|
|
// CQueuePopControl
|
|
// Replication 처리 관련 원본 Queue 와 재시도 Queue 중
|
|
// 어느 Queue 에서 Replication 대상 content 를 POP 처리할 것인지를
|
|
// 제어하기 위한 클래스
|
|
class CReplicateQueueControl
|
|
{
|
|
public:
|
|
|
|
// 생성자
|
|
CReplicateQueueControl();
|
|
|
|
// 소멸자
|
|
~CReplicateQueueControl();
|
|
|
|
// 객체 초기화 함수
|
|
bool Init( CDataQueue<CSourceData> * pSourceQueue, CDataQueue<CRetryData> * pRetryQueue );
|
|
|
|
|
|
// Replication 을 처리할 객체를 요청한 수만큼 list 형태로 전달
|
|
// @param [in] nCnt 요청 개수를 입력한다.
|
|
// @param [out] lstWork 작업대상 정보를 list형태로 전달
|
|
// @return true 처리할 data 가 존재하는 경우..
|
|
// false 처리할 data 가 없는 경우
|
|
bool GetWork(unsigned int nCnt, std::list<CRetryData>& lstWork);
|
|
|
|
|
|
private:
|
|
|
|
// 복제대상 Content 정보를 관리하는 Queue 객체에 대한 포인터
|
|
CDataQueue<CSourceData> * m_pSourceQueue;
|
|
|
|
// 복제 처리 관련 재시도 Content 정보를 관리하는 Queue 객체에 대한 포인터
|
|
CDataQueue<CRetryData> * m_pRetryQueue;
|
|
|
|
// Report log 처리 관련 객체
|
|
CReportLog m_reportLog;
|
|
|
|
};
|
|
|
|
#endif // __REPLICATE_QUEUE_CONTROL_H__
|