Versions Compared

Key

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

...

IDIEP-122
Author
Sponsor
Created

  

Status

Status
colour

Grey

Green
title

DRAFT

COMPLETED


Table of Contents

Motivation

...

Two new client cache operations are required:

Name

Code

OP_CACHE_INVOKE1024
OP_CACHE_INVOKE_ALL1025

OP_CACHE_INVOKE message format

Request
intCache Id
byteFlags: standard cache flags, see ClientCacheRequest. Only KEEP_BINARY is applicable. When KEEP_BINARY is set, the entry processor should receive key/val in binary form.
BinaryObjectEntry processor
byteEntry processor platform (see ClientPlatform class, 1 = Java)
intEntry processor argument count
(Object) * countEntry processor arguments


Response
ObjectResult, returned by entry processor

In case of such response we need some new error code to distinguish entry processor exceptions and and general client/server exceptions.

Alternatively, we can slightly extend response format (also for similarity with OP_CACHE_INVOKE_ALL response):

Response
booleanSuccess flag
ObjectResult, returned by entry processor, or error message in case of failure

In this case introduction of the new error code is not required, entry processor exceptions will be indicated by success flag = false, and general client/server exceptions will be handled by response header flag and error code.   

OP_CACHE_INVOKE_ALL message format

Request
intCache Id
byteFlags: standard cache flags, see ClientCacheRequest. Only KEEP_BINARY is applicable. When KEEP_BINARY is set, the entry processor should receive key/val in binary form.
intKeys count
(Object) * countKeys
BinaryObjectEntry processor
byteEntry processor platform (see ClientPlatform class, 1 = Java)
intEntry processor argument count
(Object) * countEntry processor arguments


Response
intCount of entry processor results
(EntryProcessorResult) * count


ObjectKey
booleanSuccess flag
ObjectResult, returned by entry processor, or error message in case of failure


Client-side API (java thin client)

...

// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.

Discussion Links

https:// Links to discussions on the devlist, if applicable.lists.apache.org/thread/qrxmzcg5tvgot1tl2ko5x4qk08t51slf

Reference Links

[1]

Anchor
1
1
JCache invoke javadoc

...