Skip to content

FEATURE: Add attribute get/set APIs#1102

Merged
jhpark816 merged 1 commit into
naver:developfrom
f1v3-dev:feat/v2-attr-apis
Jul 15, 2026
Merged

FEATURE: Add attribute get/set APIs#1102
jhpark816 merged 1 commit into
naver:developfrom
f1v3-dev:feat/v2-attr-apis

Conversation

@f1v3-dev

Copy link
Copy Markdown
Collaborator

🔗 Related Issue

⌨️ What I did

  • v2 API에 Attribute 와 관련된 getattr, setattr API를 추가했습니다.

기존 ArcusClient API와 차이점

  • getattr

    • v1: CollectionAttributes extends Attributes 반환
    • v2: ItemAttributes 반환
  • setattr

    • v1: asyncSetAttr(String key, Attributes attrs) ← expTime을 int 타입으로 줄 수 있음.
    • v2: setAttributes(String key, UpdateAttributes attributes) ← expTime을 long 타입으로 줄 수 있음.

@f1v3-dev
f1v3-dev requested a review from oliviarla July 15, 2026 05:00
@f1v3-dev f1v3-dev self-assigned this Jul 15, 2026

@oliviarla oliviarla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

여러개의 attribute를 setAttributes API통해 수정하는 테스트도 추가하면 좋겠습니다.

Comment thread src/test/java/net/spy/memcached/v2/AttributesAsyncArcusCommandsTest.java Outdated
Comment thread src/test/java/net/spy/memcached/v2/AttributesAsyncArcusCommandsTest.java Outdated
@f1v3-dev
f1v3-dev force-pushed the feat/v2-attr-apis branch from 62e76dd to d49b819 Compare July 15, 2026 09:09
@f1v3-dev

Copy link
Copy Markdown
Collaborator Author

@oliviarla
리뷰해주신 내용 반영하였으며, UpdateAttributes 도 아래와 같은 수정사항이 있습니다.

  • readable 은 "true" 로만 설정 가능
  • maxCount() Javadoc 추가

@f1v3-dev
f1v3-dev requested a review from oliviarla July 15, 2026 09:09
@f1v3-dev
f1v3-dev force-pushed the feat/v2-attr-apis branch from d49b819 to fc340bd Compare July 15, 2026 09:30
@oliviarla
oliviarla requested a review from jhpark816 July 15, 2026 11:49

@jhpark816 jhpark816 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

리뷰 완료

참고 사항을 리뷰로 남깁니다.

.maxCount(5_000L)
.overflowAction(CollectionOverflowAction.largest_trim)
.maxBKeyRange(BKey.of(10L))
.readable()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

readable = true 설정 경우만 있어서, 인자를 제외한 것이네요.

collection create 하는 경우는 unreadble 설정만 가능하지만,
readable()에서 true/false 값을 받고 있습니다. 참고 바랍니다.

@jhpark816
jhpark816 merged commit 67568f5 into naver:develop Jul 15, 2026
2 checks passed
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.

3 participants