-
Notifications
You must be signed in to change notification settings - Fork 45
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
base: develop
Are you sure you want to change the base?
REFACTOR: ArucsClientPool constructor parameters. #764
Conversation
2ec8a20
to
02b0831
Compare
02b0831
to
50f632e
Compare
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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와의 결합을 끊어내려고 합니다.
이슈 설명 한번 읽어주세요.
@oliviarla 추가 리뷰어 지정합니다. |
이슈
https://github.com/jam2in/arcus-works/issues/572
구현
ArcusClientPool 의 생성자를 리팩토링하였습니다.
기존 코드와 동일하게 CacheManager 생성자가 완료되면,
zk로부터 캐시리스트 정보를 받아옴이 보장됩니다.
그러므로 cacheManager.getAC()가 정확한 정보를 가지게 됩니다.