feat: Dual 이중 버킷 유량제어 패키지 추가 (DJErp→Dual 리네임·이관)
- InflowType 열거형 추가 (ADAPTER/INTERFACE/CLIENT 타입 코드 캡슐화) - InflowControlDAO: InflowType 기반 범용 메서드 추가, 기존 메서드 위임 - RequestProcessor: private→protected 전환, 클라이언트/어댑터/인터페이스 유량제어 훅 메서드 5개 추가 (checkClientInflow 등) - dual 패키지 신규 추가 · DualCustomBucket: perSecond/threshold 이중 버킷, 차단 원인 구분 · DualBucket: isAdapterPassDetail 등 차단 원인 반환 인터페이스 · DualInflowControlManager: 그룹 메트릭 카운팅(TargetMetrics), 리로드 연동 · DualRequestProcessor: 클라이언트 유량제어 + 상세 오류 메시지 훅 구현 - 단위 테스트 5종 추가 (DualCustomBucket, Manager, Metrics, RequestProcessor, Concurrency) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,20 +41,36 @@ public class InflowControlDAO extends BaseDAO {
|
||||
@Autowired
|
||||
private InflowControlGroupMappingLoader inflowControlGroupMappingLoader;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Enum 기반 범용 메서드 — type 코드를 직접 노출하지 않음
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public List<InflowTargetVO> getInflowList(InflowType type) throws DAOException {
|
||||
return getInflowList(type.code());
|
||||
}
|
||||
|
||||
public Map<String, InflowTargetVO> getInflowMap(InflowType type, String name) throws DAOException {
|
||||
return getInflowMap(type.code(), name);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// 기존 명명 메서드 — enum 기반 메서드로 위임
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public List<InflowTargetVO> getInflowAdapterList() throws DAOException {
|
||||
return getInflowList("01");
|
||||
return getInflowList(InflowType.ADAPTER);
|
||||
}
|
||||
|
||||
public List<InflowTargetVO> getInflowInterfaceList() throws DAOException {
|
||||
return getInflowList("02");
|
||||
return getInflowList(InflowType.INTERFACE);
|
||||
}
|
||||
|
||||
public Map<String, InflowTargetVO> getInflowTargetByAdater(String name) throws DAOException {
|
||||
return getInflowMap("01", name);
|
||||
return getInflowMap(InflowType.ADAPTER, name);
|
||||
}
|
||||
|
||||
public Map<String, InflowTargetVO> getInflowTargetByInterface(String name) throws DAOException {
|
||||
return getInflowMap("02", name);
|
||||
return getInflowMap(InflowType.INTERFACE, name);
|
||||
}
|
||||
|
||||
private List<InflowTargetVO> getInflowList(String type) throws DAOException {
|
||||
|
||||
Reference in New Issue
Block a user