INTERNAL: Remove duplicated operation method overrides#885
Conversation
|
@brido4125 |
| @Override | ||
| public boolean isPipeOperation() { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
질문입니다.
여기에는 isIdempotentOperation() 메소드가 기존에 없었나요?
There was a problem hiding this comment.
이 부분에는 따로 isIdempotentOperation() 메소드가 정의되어 있지 않았지만, 추상클래스인 BaseStoreOperationImpl을 상속하는 모든 클래스에서 Operation 인터페이스의 isIdempotentOperation() 메소드를 Override 하고 있기 때문에 문제되지 않습니다.
| @Override | ||
| public boolean isIdempotentOperation() { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
여기도 기존에 isBulkOperation()과 isPipeOperation() 메소드가 없어도 괜찮았나요?
There was a problem hiding this comment.
StoreOperationImpl 클래스에서는 isBulkOperation()과 isPipeOperation()을 따로 정의하지 않아도 BaseStoreOperationImpl 클래스에서 상속하기 때문에 문제되지 않습니다.
src/main/java/net/spy/memcached/protocol/binary/SASLBaseOperationImpl.java
Show resolved
Hide resolved
8958d09 to
4fd8d3b
Compare
default methods|
@oliviarla 먼저 리뷰해 주세요. |
src/main/java/net/spy/memcached/protocol/binary/SASLBaseOperationImpl.java
Show resolved
Hide resolved
| @Override | ||
| public boolean isIdempotentOperation() { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
isIdempotentOperation()는 남겨두어야 합니다.
|
@Jinyshin |
14217e2 to
dd7cb68
Compare
dd7cb68 to
2692df2
Compare
🔗 Related Issue
⌨️ What I did
isIdempotentOperation(),isBulkOperation(),isPipeOperation()메서드의 구현체 대부분이 동일한 반환값을 가지므로 중복된 구현을 제거하고자BaseOperationImpl추상 클래스에 공통 구현으로 정리했습니다.OperationImpl구현체들에서 불필요한 메서드 오버라이드를 정리했습니다.