forked from linkedin/rest.li
-
Notifications
You must be signed in to change notification settings - Fork 0
Rest.li 2.0 response API
Keren Jin edited this page Jun 14, 2014
·
6 revisions
Pegasus 1.17.2 features a new set of response APIs for various batch operations. The motivation of this change is to simplify the old response APIs. This change focuses on two sets of operations: BatchGet and BatchUpdate/BatchPartialUpdate/BatchDelete.
| Response name | Returned by | Strong-typed key? | Value type |
|---|---|---|---|
| BatchResponse | BatchGetRequestBuilder.build() | No | T |
| BatchKVResponse | BatchGetRequestBuilder.buildKV() | Yes | T |
| BatchEntityResponse | BatchGetEntityRequestBuilder.build() | Yes | EntityResponse |
EntityResponse contains three fields:
-
entityprovides an entity record if the server resource finds a corresponding value for the key; -
statusprovides an optional status code; -
errorprovides the error detail from the server resource (generallyentityanderrorare mutually exclusive, but it is ultimately up to the server resource).