base
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
/***************************************************************************
|
||||
Cache content delete class
|
||||
-----------------------------------------
|
||||
begin : 2010/03/11
|
||||
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 __CACHE_DELETE_H__
|
||||
#define __CACHE_DELETE_H__
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "RcdbInfo.h"
|
||||
|
||||
// CCacheDelete
|
||||
// RCDB 에 저장된 Hot Content Cache Content 의 Timeout 여부를 판단하여...
|
||||
// 설정된 유효 기간이 초과된 경우.. 삭제 처리를 수행한다.
|
||||
class CCacheDelete
|
||||
{
|
||||
public :
|
||||
// 생성자
|
||||
CCacheDelete();
|
||||
|
||||
// 소멸자
|
||||
~CCacheDelete();
|
||||
|
||||
// 객체 초기화 수행
|
||||
bool Init();
|
||||
|
||||
// thread를 생성하여 업무 flow 를 시작.
|
||||
bool Start();
|
||||
|
||||
|
||||
private :
|
||||
|
||||
// 스레드 함수
|
||||
static void* threadFunc( void* arg );
|
||||
|
||||
// 스레드 내에서 각 loop 단위 처리 호출 함수.
|
||||
void Execute();
|
||||
|
||||
// RCDB t_dav_resource 테이블에서 유효기간이 지난 Hot Content Cache Content 를 삭제 처리
|
||||
// - 구형 RCDB 지원 목적
|
||||
bool DeleteFromOldDB();
|
||||
|
||||
// RCDB t_meta_xxx 테이블에서 유효기간이 지난 Hot Content Cache Content 를 삭제 처리
|
||||
// - 신형 RCDB 지원 목적
|
||||
bool DeleteFromDB();
|
||||
|
||||
|
||||
private :
|
||||
|
||||
// 내부 Thread 에 대한 ID
|
||||
pthread_t m_threadHandle;
|
||||
|
||||
// RCDB 접속 정보를 저장할 변수.
|
||||
CRcdbInfo m_rcdbInfo;
|
||||
|
||||
// New 2014-06-23 huibong
|
||||
// RCDB 형상변경에 따라 서비스별 Table 분리 여부 판단 flag
|
||||
// TODO: 향후 신규 RCDB 형상 적용 완료 후 본 항목 제거 필요.
|
||||
// - false : 기존 t_dav_resource 테이블 사용.
|
||||
// - ture : 신규 RCDB 형상 (서비스별 meta table 분리) 사용.
|
||||
bool m_bServiceTableSeparate;
|
||||
|
||||
};
|
||||
|
||||
#endif // __CACHE_DELETE_H__
|
||||
Reference in New Issue
Block a user