Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Error Response

Description

 This response type is returned when an error occurs with any command type.

Response

...

ErrorResponse
Field NameData typeDescriptionMandatory?
errorCode

...

Type: int

IntAn Integer

...

representing the error

...

message

...

Type: string

code for a specific errorY
errorMessageStringA 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 CodeError DefinitionError 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_FAILUREThis 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_ERRORThere was an error whilst encoding a data entry (key / value)
 DECODING_ERRORThere 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 NameData typeDescriptionMandatory?
regionName

...

Type: string

...

StringThe name of the region which is to be targetedY
key

...

EncodedValue

...

The key that is to be looked up

...

Y

Response

 

GetResponse
Field NameData typeDescriptionMandatory?

...

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 CodeError DefinitionError Description
 REGION_NOT_FOUNDNo Region exists for the name provided
 CONSTRAINT_VIOLATIONThe 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 NameData typeDescriptionMandatory?
regionName

...

Type: string

...

StringThe name of the region which is to be targetedY
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.

...