INTERNAL: Remove public ArcusClient constructor.#764
INTERNAL: Remove public ArcusClient constructor.#764brido4125 wants to merge 1 commit intonaver:developfrom
Conversation
2ec8a20 to
02b0831
Compare
02b0831 to
50f632e
Compare
|
@oliviarla 추가 리뷰어 지정합니다. |
2fbc758 to
796c41a
Compare
|
PR 제목을 실제 변경사항과 일치하게 바꿔주세요. |
ArcusClient 상속할 경우가 추후에 발생하나요? |
FrontCacheMemcachedClient와 MemcachedClient의 관계처럼 |
796c41a to
efd42d5
Compare
9aa38b0 to
9d4db1d
Compare
9d4db1d to
927a2ec
Compare
669a953 to
0a2c4ad
Compare
0a2c4ad to
b4de846
Compare
| throws IOException { | ||
| ArcusClient[] clients = new ArcusClient[size]; | ||
| for (int i = 0; i < size; i++) { | ||
| clients[i] = new ArcusClient(cfb.build(), addrs); |
There was a problem hiding this comment.
ArcusClient 호출 시에 어떤 name 값으로 지정해야 하는 지를 검토 바랍니다.
There was a problem hiding this comment.
용어 관점
- size 대신에 poolSize가 나을 것 같습니다.
- 다른 API에서 poolSize 사용하고 있습니다.
- 단순히 size는 addrs 목록의 size인지 pool size인지가 구분되지 않습니다.
There was a problem hiding this comment.
@brido4125 @oliviarla @uhm0311
addrs, poolSize, cfb 인자 순서가 나은 것 같은 데, 다른 API의 인자 순서와 일관되게 한 거죠?
새로운 API에서만 인자 순서를 변경하는 것이 어색한거죠?
There was a problem hiding this comment.
addrs, poolSize, cfb 인자 순서가 나은 것 같은 데, 다른 API의 인자 순서와 일관되게 한 거죠?
새로운 API에서만 인자 순서를 변경하는 것이 어색한거죠?
넵 다른 api와 일관되도록 의도했습니다.
| openDirect(new ConnectionFactoryBuilder() | ||
| .setOpTimeout(cf.getOperationTimeout()) | ||
| .setFailureMode(cf.getFailureMode()) | ||
| .setInitialObservers(cf.getInitialObservers())); |
There was a problem hiding this comment.
new CFB(cf) 호출하는 것과 어떤 차이가 있나요?
There was a problem hiding this comment.
new CFB(cf)의 경우 내부적으로
getInitialObservers 메서드를 오버라이드해서
비어있는 리스트를 리턴합니다.
그래서 openDirect에서 new CFB(cf)를 호출할 경우 빈 리스트가 테스트 로직내에서 사용되어
ObesrverTest의 testInitialObservers 테스트 케이스에서 에러가 발생합니다.
| * @throws IOException | ||
| */ | ||
| public static ArcusClient createArcusClient(List<InetSocketAddress> addrs, | ||
| ConnectionFactoryBuilder cfb) |
There was a problem hiding this comment.
name, addrs, cfb 인자를 가지는 API도 제공해야 하지 않는 지 ?
There was a problem hiding this comment.
아래와 같이 의견이 취합되었습니다.
There was a problem hiding this comment.
zookeeper 주소를 입력받는 createArcusClient 메서드에도 name을 입력받지 않고 있으며 name 필드 자체가 내부적으로 로깅 용도로 사용하는 값이므로, 제 생각에는 name을 입력받는 메서드를 별도로 추가하지 않아도 될 것 같습니다.
|
그리고, PR 처음 코멘트는 현재 수정 사항을 나타내도록 변경되어야 합니다. |
b4de846 to
128fe42
Compare
|
@jhpark816 님 의견에 따라 close 합니다. |
이슈
https://github.com/jam2in/arcus-works/issues/572
구현
public으로 설정된 ArcusClient 생성자를외부 사용자가 접근 할 수 없게 protected로 변경했습니다.
추후 ArcusClient가 상속 구조를 가질 수도 있을 것 같아 private으로 설정하지 않았습니다.
블라블라..
이와 더불어 기존에 memcached 주소로 연결할 수 있는 기능은
createArcusClient or createArcusClientPool 이라는 스태틱 메서드로 제공합니다. (pool도 제공)