Post

2 followers Follow
0
Avatar

Client region get

I have a client region defined with data-policy="EMPTY" and shortcut="PROXY". A get() on this client region works fine and returns the expected value, however, a call to region.entrySet() on this same client region returns an empty set. The region.entrySet() returns expected values when performed server side on the same cache. Why is this?

My understanding of the client region with data-policy="EMPTY" and shortcut="PROXY" is that all data would still be available client side but would not be cached. Is this wrong?

Tom Segreti

Please sign in to leave a comment.

3 comments

0
Avatar

Unfortunately client and server regions blur the semantics of the Map interface making things a bit confusing sometimes. In this case, entrySet works on the local region only which, in your case, is always empty. Unlike keySetOnServer() there is no analogous entrySetOnServer() method. You could easily implement a function to do this if you really needed it.

Jens Deppe 0 votes
0
Avatar

Thanks Jens...good to know. Are there any other operations similar to this that would cause unexpected results with this client/server configuration?

Tom Segreti 0 votes
0
Avatar

I'm particularly interested in the following operations:
region.put
region.putAll
region.putIfAbsent
region.get
region.containsKey
region.destroy(key)
region.size
any OQL query

Tom Segreti 0 votes