Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added horizontal rules to visually separate operation types

Table of Contents
Error Response

Description

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

...

 
Error CodeError DefinitionError Description
 LOW_MEMORYServer does not have enough free memory to complete the operation
1000 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
1100VALUE_ENCODING_ERRORThere was an error whilst encoding a data entry (key / value)
 1102DECODINGUNSUPPORTED_ERRORThere was an error whilst decoding a data entry (key / value)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.

...

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.

...

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

 Pass an OQL query to the server, which will execute it and return the resultGet a structure containing information about a region.

Request

...

GetRegionRequest
  1. query

    • Type: string

    • Description: OQL describing the query to run

  2. timeoutInMillis

    • Type: int

    • Optional (defaults to 0).

    • Description: a timeout in milliseconds after which the query will terminate. If less than or equal to 0, no user-defined timeout is imposed.

  3. parameters

    • Type: repeated EncodedValue

    • Must match the number of parameters expected for the query. Can be absent if no parameters are needed.

    • Description: must match any parameters specified in OQL

Response fields

  1. queryResults

    • Type: repeated string

    • Description: One JSON formatted string per response (see AbstractBaseController.processQueryResponse)

Behavior notes

The query will timeout on the shorter of the provided timeout or the cache’s timeout (configured in gemfire.Cache.MAX_QUERY_EXECUTION_TIME).

Errors

  • CONSTRAINT_VIOLATION - Bind parameter is not of the expected type

  • BAD_QUERY - Name in the query cannot be resolved!

  • BAD_QUERY - Query cannot be parsed.

  • PARAMETER_MISMATCH - The number of bound parameters does not match the number of placeholders!

  • OPERATION_NOT_PERMITTED - Query is not permitted on this type of region!

  • OPERATION_TIMEOUT - Query execution time has exceeded max query execution time (gemfire.Cache.MAX_QUERY_EXECUTION_TIME) configured!

  • OPERATION_TIMEOUT - Query execution time has exceeded provided timeout

GetRegion

Description

 Get a structure containing information about a region.

Request fields

  1. regionName

    • Type: string

    • Description: the name of the region to get information on.

Response fields

  1. region

    • Type: Region

    • Description: A structure containing information on the region.

Errors

  • REGION_NOT_FOUND - if the region doesn’t exist.

GetAvailableServers

Description

Returns a list of servers, in the cluster, visible to the client.

Request

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

  • If there is no region matching the regionName, a REGION_NOT_FOUND ErrorResponse will be returned

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.

GetRegionNamesRequestGetAvailableServersRequest
Field NameData typeDescriptionMandatory?
    

 

Response

...

 

GetAvailableServersResponseGetRegionNamesResponse
Field NameData typeDescriptionMandatory?Repeated
servers regions Server  A list of servers that are available in the cluster to connect to.Y

Expected Behavior

  • Return a list of all available servers in the cluster that are visible to the client

Errors

 

Error CodeError DefinitionError Description
   

GetRegionNames

Description

 Returns a list of regions available through this server.

Request fields

 None.

Response fields

...

regions

...

Type: repeated string

...

String A list of the names of the regions that are available on the server.

...

Y

 Expected behavior

  •  This only gets the regions present on the target server. This may not be the set of all regions in the cluster, depending on how the servers are configured.

Errors

None specific 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?
regionName

...

Type: string

...

StringThe name of the region to remove an entry from.Y
key

...

EncodedValue

...

The 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. 

 None.

...

RemoveResponse
Field NameData typeDescriptionMandatory?Repeated
     


Expected behavior 

  •  If the key is not present in the region, this operation will make no changes to the region

...

  • .  It will still return a RemoveResponse in this case.

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUND

...

No region with the provided regionName exists.
2000CONSTRAINT_VIOLATION

...

The 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?
regionName

...

Type: string

...

StringThe name of the region to remove

...

entries from.

...

keys

...

Type: repeated EncodedValue

...

YN
keyEncodedValueA list of keys

...

who's entries should be removed.

Response fields

 None.

...

Y



Response

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


Expected behavior 

  • If a key is not present in the region, this operation will ignore it and continue with the others.

  • If

...

  • a RemoveAllResponse is returned

...

  • with a list of failedKeys, any keys from the request not present in the response have been removed.  If an empty list is returned, all keys were removed.

  • Any keys present in failedKeys will have their entry remain in the same state they were in prior to this operation.

  • If an error response is returned by this operation (instead of a RemoveAllResponse), all entries remain in the same state as prior to this operation.

Errors

...

Errors

Error CodeError DefinitionError Description
2100
REGION_NOT_FOUND

...

No region with the provided regionName exists

...

.


...

PutAll

Description

 Put a collection of Entries into a region.

Request

...

PutAllRequest
Field NameData typeDescriptionMandatory?Repeated?
regionName

...

String

...

The name of the region to put entries into.YN
entries

...

Entry

...

A list of entries to add to the region.

...

Y


Response

PutAllResponse
Field NameData typeDescriptionMandatory?Repeated
failedKeys

...

KeyedErrorResponse

...

A list of keys

...

that were not added.NY


Expected behavior 

...

Behavior notes

...

  • If a PutAllResponse is returned with a list of failedKeys, any keys from the request not present in the

...

  • response were successfully

...

  • added/updated.

...

If two Entries share equal keys, a successful operation will result in one of the Entries being present in the region. Which one is undefined.

  • Any keys present in failedKeys will have their entry remain in the same state they were in prior to this operation.

  • If an error response is returned by this operation (instead of a RemoveAllResponse), all entries remain in the same state as prior to this operation.

Errors

Errors

Error CodeError DefinitionError Description
2100
REGION_NOT_FOUND

...

No region with the provided regionName exists.

...

CONSTRAINT_VIOLATION - the type of value provided for a key or value doesn’t match the region’s constraints.


...

GetAll

Description

 Get a series of values from a region.

Request

...

GetAllRequest
Field NameData typeDescriptionMandatory?Repeated?
regionName

...

String

...

The name of the region to get entries from.YN
keys

...

EncodedValue

...

Description: the keys to look up in the region.

A 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 

  • If a GetAllResponse is returned and no entry is returned for a particular key, and that key is not present in the failedKeys, then no entry exists for that key in the region.

Errors

Error CodeError DefinitionError Description
2100REGION_NOT_FOUNDNo

Response fields

  1. entries

    • Type: repeated Entry

    • Description: the entries corresponding to keys that were present.

  2. errors

    • Type: repeated ErrorEntry

    • Description: any keys that encountered an error will be returned here instead of in entries.

Behavior notes

  1. An error for any key will return an error.

  2. Any key not found in the region will return an Entry with that key and a null value.

Errors

...

region with the provided regionName exists.

...

CONSTRAINT_VIOLATION - the type of value provided for a key doesn’t match the region’s constraints.

 

 

 

...