Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFACTOR: ArucsClientPool constructor parameters. #764

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

brido4125
Copy link
Collaborator

이슈

https://github.com/jam2in/arcus-works/issues/572

구현

ArcusClientPool 의 생성자를 리팩토링하였습니다.
기존 코드와 동일하게 CacheManager 생성자가 완료되면,
zk로부터 캐시리스트 정보를 받아옴이 보장됩니다.

그러므로 cacheManager.getAC()가 정확한 정보를 가지게 됩니다.

@brido4125 brido4125 force-pushed the internal/ArcusClientPoolConstructor branch from 2ec8a20 to 02b0831 Compare June 5, 2024 07:26
@brido4125 brido4125 changed the title REACTOR: ArucsClientPool constructor parameters. REFACTOR: ArucsClientPool constructor parameters. Jun 5, 2024
@brido4125 brido4125 requested a review from uhm0311 June 5, 2024 07:51
@brido4125 brido4125 force-pushed the internal/ArcusClientPoolConstructor branch from 02b0831 to 50f632e Compare June 10, 2024 02:06
Copy link
Collaborator

@jhpark816 jhpark816 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 완료

public ArcusClientPool(CacheManager cacheManager) {
this.client = cacheManager.getAC();
this.poolSize = client.length;
this.rand = new Random();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArcusClientPool 생성자에서 cacheManager를 인자로 받는 의도는 무엇인가요?

아래의 clientPool 인자만 가져도 충분하지 않나 생각됩니다.

public ArcusClientPool(ArcusClient[] clientPool)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

본 PR의 이슈와 관련 있습니다.
간단히 설명하자면, CacheManager나 Locator 등의 Pool에서 사용되는 객체들에 대한 의존성을
ArcusClientPool에 위임하고 ArcusClient와의 결합을 끊어내려고 합니다.

이슈 설명 한번 읽어주세요.

@jhpark816 jhpark816 requested a review from oliviarla June 10, 2024 03:23
@jhpark816
Copy link
Collaborator

@oliviarla 추가 리뷰어 지정합니다.

@brido4125 brido4125 requested review from oliviarla and removed request for oliviarla June 18, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants