Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 의존성 정리, 사용하지 않는 Component 제거
Browse files Browse the repository at this point in the history
miiiinju1 committed Aug 29, 2024
1 parent c6eaf91 commit 253eb48
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -11,13 +11,11 @@
import javax.sql.DataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

/**
* 비동기적으로 로그를 처리하는 클래스입니다. 이 클래스는 로그를 저장하는 비동기 작업을 수행하며, 이를 위해 별도의 스레드 풀을 사용합니다.
*/
@Slf4j
@Component
public class AsyncLogProcessor {

// 로그 저장 작업을 수행하는 스레드 풀
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@
public class AsyncLogRepository implements LogRepository {

private final JdbcTemplate jdbcTemplate;
private final AsyncLogProcessor asyncLogProcessor;
private final AsyncMultiProcessor<Log> asyncMultiProcessor;

private static final Long DEFAULT_RETURNS = 0L;
@@ -29,18 +28,17 @@ public class AsyncLogRepository implements LogRepository {
public void init() {
log.info("AsyncLogRepository is initialized.");
asyncMultiProcessor.init(this::saveLogsToDatabase);
asyncLogProcessor.init(this::saveLogsToDatabase);
}

@Deprecated
@Override
public long save(Log log) {
asyncLogProcessor.submitLog(log);
return DEFAULT_RETURNS;
}

@Deprecated
@Override
public List<Log> saveAll(List<Log> logs) {
asyncLogProcessor.submitLogs(logs);
return logs;
}

0 comments on commit 253eb48

Please sign in to comment.