Error Response

Description

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

Response

ErrorResponse
Field NameData typeDescriptionMandatory?
errorCodeIntAn Integer representing the error 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
1000UNCLASSIFIED_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
1100VALUE_ENCODING_ERRORThere was an error whilst encoding a data entry (key / value)
1102UNSUPPORTED_OPERATIONThe request isn't a valid server operation
1201AUTHORIZATION_FAILEDThe client doesn't have sufficient access rights to perform this operation
1300LOW_MEMORYServer does not have enough free memory to complete the operation

 


Get

Description

Gets the value associated with a particular key in a particular region.

Request

 

GetRequest
Field NameData typeDescriptionMandatory?
regionNameStringThe name of the region which is to be targetedY
keyEncodedValueThe key that is to be looked upY

Response

 

GetResponse
Field NameData typeDescriptionMandatory?
resultEncodedValueThe value matching the looked-up keyY


Expected behavior

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo Region exists for the name provided
2000CONSTRAINT_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

PutRequest
Field NameData typeDescriptionMandatory?
regionNameStringThe name of the region which is to be targetedY
entryEntryA type containing (key, value) pair to be inserted into the region.Y

Response

A successful Put operaration will result in an empty PutResponse message. This is because there is no data that needs to be sent back, but a message is needed to indicate a complete operation.

PutResponse
Field NameData typeDescriptionMandatory?
    

Expected Behavior

 Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo Region exists for the name provided
2000CONSTRAINT_VIOLATIONThe key-constraint on the region has been violated and incompatible

 

 


GetRegion

Description

Get a structure containing information about a region.

Request

GetRegionRequest
Field NameData typeDescriptionMandatory?
regionNameStringThe name of the region to get information on


Response

GetRegionResponse
Field NameData typeDescriptionMandatory?
regionRegionA structure containing information on the region


Expected behavior

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo Region exists for the name provided

GetRegionNames

Description

 Returns a list of regions available through this server.

Request

A GetRegionNamesRequest contains no extra data fields.

GetRegionNamesRequest
Field NameData typeDescriptionMandatory?
    

 

Response 

GetRegionNamesResponse
Field NameData typeDescriptionMandatory?Repeated
regions String A list of the names of the regions that are available on the server.Y

 Expected behavior

Errors

There are no errors particular to this operation.

Error CodeError DefinitionError Description
   



Remove

Description

Remove an entry from a region.

Request

RemoveRequest
Field NameData typeDescriptionMandatory?
regionNameStringThe name of the region to remove an entry from.Y
keyEncodedValueThe key of the entry to be removed.Y


Response

The presence of a remove response indicates the entry is not longer present in the region. The response contains no additional data fields. 

RemoveResponse
Field NameData typeDescriptionMandatory?Repeated
     


Expected behavior 

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo region with the provided regionName exists.
2000CONSTRAINT_VIOLATIONThe type of value provided for the key doesn’t match the region’s constraints. 



RemoveAll

Description

Removes all of a list of entries from a region.

Request

RemoveAllRequest
Field NameData typeDescriptionMandatory?Repeated?
regionNameStringThe name of the region to remove entries from.YN
keyEncodedValueA list of keys who's entries should be removed.Y



Response

RemoveAllResponse
Field NameData typeDescriptionMandatory?Repeated
failedKeysKeyedErrorResponseA list of keys that were not removed.NY


Expected behavior 

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo region with the provided regionName exists.



PutAll

Description

Put a collection of Entries into a region.

Request

PutAllRequest
Field NameData typeDescriptionMandatory?Repeated?
regionNameStringThe name of the region to put entries into.YN
entriesEntryA list of entries to add to the region.Y


Response

PutAllResponse
Field NameData typeDescriptionMandatory?Repeated
failedKeysKeyedErrorResponseA list of keys that were not added.NY


Expected behavior 

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo region with the provided regionName exists.



GetAll

Description

Get a series of values from a region.

Request

GetAllRequest
Field NameData typeDescriptionMandatory?Repeated?
regionNameStringThe name of the region to get entries from.YN
keysEncodedValueA list of keys to fetch values for.YY  



Response

GetAllResponse
Field NameData typeDescriptionMandatory?Repeated
entriesEntryA list of looked up entries.YY
failedKeysKeyedErrorResponseA list of keys which generated errors on lookup.NY


Expected behavior 

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo region with the provided regionName exists.