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

인터페이스 구현체의 interface 지정 이슈 #23

Closed
jhpark816 opened this issue Apr 8, 2015 · 4 comments
Closed

인터페이스 구현체의 interface 지정 이슈 #23

jhpark816 opened this issue Apr 8, 2015 · 4 comments
Assignees

Comments

@jhpark816
Copy link
Collaborator

CollectionUpsertOperationImpl의 interface 지정이 아래와 같습니다.
CollectionUpsertOperation interface를 지정하도록 수정하는 게 좋을 것 같습니다.

참고 사항으로, CollectionStoreOperation와 CollectionUpsertOperation가 동일한 interface이기 때문에,
동작에는 문제가 없습니다.

public class CollectionUpsertOperationImpl extends OperationImpl implements
        CollectionStoreOperation {
    . . .
}
@jhpark816
Copy link
Collaborator Author

ExtendedBTreeGetOperationImpl도 interface 지정이 잘못 되어 있는 것 같습니다..
ExtendedBTreeGetOperation의 Callback interface는
CollectionGetOperation의 Callback interface와 argument가 다른 데, 괜찮은가요 ?

public class ExtendedBTreeGetOperationImpl extends OperationImpl
    implements CollectionGetOperation {
    . . .
}

@jhpark816 jhpark816 changed the title CollectionUpsertOperationImpl의 interface 지정 인터페이스 구현체의 interface 지정 이슈 Apr 8, 2015
@whchoi83
Copy link
Contributor

ExtendedBTreeGetOperationImple 의 instance 를 ArcusClient class 에서 생성하는데 이때 매개변수로 넘겨주는 Callback interface 의 구현을 부분을 보면
ExtendedBTreeGetOperationImpl 은 ExtendBTreeGetOperation interface를 implements 하는 것이 맞습니다.
해당 부분의 소스는 아래와 같습니다.

    private <T> CollectionFuture<Map<ByteArrayBKey, Element<T>>> asyncBopExtendedGet(
            final String k, final CollectionGet<T> collectionGet,
            final boolean reverse, final Transcoder<T> tc) {

...
        Operation op = opFact.collectionGet2(k, collectionGet,
                new ExtendedBTreeGetOperation.Callback() {
                    TreeMap<ByteArrayBKey, Element<T>> map = new ByteArrayTreeMap<ByteArrayBKey, Element<T>>(
                            (reverse) ? Collections.reverseOrder() : null);
...
                    public void gotData(String key, byte[] subkey,
                            byte[] elementFlag, int flags, byte[] data) {
                        assert key.equals(k) : "Wrong key returned";
                        Element<T> element = new Element<T>(subkey, tc
                                .decode(new CachedData(flags, data, tc
                                        .getMaxSize())), elementFlag);
                        map.put(new ByteArrayBKey(subkey), element);
                    }
                });

@whchoi83 whchoi83 assigned jhpark816 and unassigned whchoi83 Apr 14, 2015
@whchoi83
Copy link
Contributor

commit 완료 했습니다.
리뷰 부탁드립니다.
commit : ed4ef54

@jhpark816
Copy link
Collaborator Author

code reveiw & merge 했습니다..
이슈 브랜치는 제거해도 됩니다.

jhpark816 pushed a commit that referenced this issue Aug 31, 2016
SuhwanJang pushed a commit to SuhwanJang/arcus-java-client that referenced this issue Sep 17, 2020
CLEANUP: send command in ZookeeperFourLetterAsyncComponent
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

No branches or pull requests

2 participants