Arcus Memcached
DOCSBLOGJaM2in
1.13.5
1.13.5
  • install
  • administration
    • commandline_args
  • ARCUS Cache Server ASCII Protocol
    • Chapter 1. ARCUS Basic Concept
    • Chapter 2. Collection Concept
    • Chapter 3. Item Attribute 설명
    • Chapter 4. Simple Key-Value 명령
    • Chapter 5. LIST 명령
    • Chapter 6. SET 명령
    • Chapter 7. MAP 명령
    • Chapter 8. B+Tree 명령
    • Chapter 9. Command Pipelining
    • Chapter 10. Item Attribute 명령
    • Chapter 11. Scan 명령
    • Chapter 12. Admin & Monitoring 명령
    • ARCUS Telnet Interface
Powered by GitBook
On this page
  • getattr (Item Attribute 조회)
  • setattr (Item Attribute 변경)

Was this helpful?

  1. ARCUS Cache Server ASCII Protocol

Chapter 10. Item Attribute 명령

Last updated 11 months ago

Was this helpful?

Item attributes를 조회하는 getattr 명령과 변경하는 setattr 명령을 소개한다.

ARCUS에서 어떤 item attributes를 제공하는 지를 알고자 한다면, 을 참고 바란다.

getattr (Item Attribute 조회)

Item attributes를 조회하는 getattr 명령은 아래와 같다.

getattr <key> [<name> ...]\r\n
  • <key> - 대상 item의 key string

  • [<name> ...] - 조회할 attribute name을 순차적으로 지정하는 것이며, 이를 생략하면, item 유형에 따라 조회가능한 모든 attributes 값을 조회한다.

성공 시의 response string은 아래와 같다. getattr 명령의 인자로 지정한 attribute name 순서대로 name과 value의 쌍을 리턴한다.

ATTR <name>=<value>\r\n
ATTR <name>=<value>\r\n
...
END\r\n

실패 시의 response string과 그 의미는 아래와 같다.

Response String
설명

"NOT_FOUND"

key miss

"ATTR_ERROR not found"

인자로 지정한 attribute가 존재하지 않거나 해당 item 유형에서 지원되지 않는 attribute임.

"CLIENT_ERROR bad command line format"

protocol syntax 틀림

setattr (Item Attribute 변경)

Item attributes를 변경하는 setattr 명령은 아래와 같다. 모든 attributes에 대해 조회가 가능하지만, 변경은 일부 attributes에 대해서만 가능하다. 변경가능한 attributes로는 expiretime, maxcount, overflowaction, readable, maxbkeyrange가 있다.

setattr <key> <name>=<value> [<name>=<value> ...]\r\n
  • <key> - 대상 item의 key string

  • <name>=<value> - 변경할 attribute의 name과 value 쌍을 하나 이상 명시하여야 한다.

이 명령의 response string과 그 의미는 아래와 같다.

Response String
설명

"OK"

성공

"NOT_FOUND"

key miss

"ATTR_ERROR not found"

인자로 지정한 attribute가 존재하지 않거나 해당 item 유형에서 지원되지 않는 attribute임.

"ATTR_ERROR bad value"

해당 attribute에 대해 새로 변경하고자 하는 value가 allowed value가 아님.

"CLIENT_ERROR bad command line format"

protocol syntax 틀림

Item Attibute 설명