Table of Contents
Error Response
Description
This response type is returned when an error occurs with any command type.
Response
...
ErrorResponse | |||
Field Name | Data type | Description | Mandatory? |
---|---|---|---|
errorCode |
...
Type: int
Int | An Integer |
...
representing the error |
...
message
...
Type: string
code for a specific error | Y | |
errorMessage | String | A description of |
...
the error. | N |
Possible Errors
While each operation describes some errors particular to its execution, the following errors are fairly generic and can be seen in a wide variety of operations. This list is a possible super-set of errors that can be thrown and are applicable to all operations.
Error Code | Error Definition | Error Description |
---|---|---|
LOW_MEMORY |
...
Server does not have enough free memory to complete the operation | |
...
DATA_UNREACHABLE - unable to reach a server containing the required data
...
UNCLASSIFIED_FAILURE | This error will be thrown as a last resort, if an exception cannot be classified. This error will then have to be investigated and correctly classified | |
ENCODING_ERROR | There was an error whilst encoding a data entry (key / value) | |
DECODING_ERROR | There was an error whilst decoding a data entry (key / value) |
Get
Description
Gets the value associated with a particular key in a particular region.
Request
...
GetRequest | |||
Field Name | Data type | Description | Mandatory? |
---|---|---|---|
regionName |
...
Type: string
...
String | The name of the region which is to be targeted | Y |
key |
...
EncodedValue |
...
The key that is to be looked up |
...
Y |
Response
GetResponse | |||
Field Name | Data type | Description | Mandatory? |
---|
...
result |
...
EncodedValue |
...
The value matching the looked-up key |
...
Y |
Expected behavior
If
...
Behavior Notes
if key is not found in the region, returns null.
Errors
the result will not be populated.
For valid key, return value as EncodedValue
- If there is no region matching the regionName, a REGION_NOT_FOUND - no region with the provided regionName exists.
CONSTRAINT_VIOLATION - the type of value provided for the key doesn’t match the region’s constraints.
VALUE_ENCODING_ERROR - if the value stored on the server cannot be encoded and sent to the client.- ErrorResponse will be returned
- If the provided key does not match the configured key-constraint on the region, a CONSTRAINT_VIOLATION ErrorResponse will be returned
Errors
Error Code | Error Definition | Error Description |
---|---|---|
REGION_NOT_FOUND | No Region exists for the name provided | |
CONSTRAINT_VIOLATION | The key-constraint on the region has been violated and incompatible |
Put
Description
Adds a (key, value) pair to a region, replacing any existing entry for the key.
Request fields
PutRequest | |||
Field Name | Data type | Description | Mandatory? |
---|---|---|---|
regionName |
...
Type: string
...
String | The name of the region which is to be targeted | Y |
entry |
...
Entry |
...
A type containing (key, value) pair to be inserted into the region. | Y |
Response fields
None - returns an empty put response message indicating success.
...