ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » global cache for multiple keys

Post new topic  Reply to topic
 global cache for multiple keys « View previous topic :: View next topic » 
Author Message
IIB4VV
PostPosted: Tue Jul 24, 2018 8:28 pm    Post subject: global cache for multiple keys Reply with quote

Newbie

Joined: 02 Jan 2017
Posts: 7

Hi I have a requirement to use the global cache but I have multiple inputs and multiple outputs like

key1,key2,key3 and value1,value2,value3,value4.

If all keys matches with my input then i need to fetch the all 4 values.

Please suggest how can i do with global cache.

My understanding is global cache library will work with only one key-value pair.

Please suggest if there is a way,

Thanks,
VV
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 25, 2018 1:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

and you have no idea how to stick 3 fields into on value and 4 fields into the other???
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
IIB4VV
PostPosted: Wed Jul 25, 2018 2:40 am    Post subject: Reply with quote

Newbie

Joined: 02 Jan 2017
Posts: 7

3 keys and 4 values are not fixed, it can vary.

I know to add values as array, but I want to know is there any way to add keys also into array and search the key values as array and fetch the values array if all keys are matched.

My last option will be using delimiter for keys and values.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 26, 2018 2:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

IIB4VV wrote:
3 keys and 4 values are not fixed, it can vary.

I know to add values as array, but I want to know is there any way to add keys also into array and search the key values as array and fetch the values array if all keys are matched.

My last option will be using delimiter for keys and values.

Would nearly be better to use XML. Your key needs to have 3 fields and be serializable...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
IIB4VV
PostPosted: Thu Jul 26, 2018 4:58 am    Post subject: Reply with quote

Newbie

Joined: 02 Jan 2017
Posts: 7

But Global cache is accepting only one key right, how can I cache xml with 3 keys. Please help.
Back to top
View user's profile Send private message
timber
PostPosted: Thu Jul 26, 2018 2:15 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
how can I cache xml with 3 keys
I think you know this already, but you were hoping to be proved wrong...

The answer is, you cannot. The global cache is essentially a hashmap. If you want to use a composite key then you have to perform the same tricks as you would use in (say) Java. Construct a string containing all 3 values. Or create an object containing all 3 values and use it as the key (but remember to only create one key object per unique combintion of values!).
Back to top
View user's profile Send private message
IIB4VV
PostPosted: Thu Jul 26, 2018 9:33 pm    Post subject: Reply with quote

Newbie

Joined: 02 Jan 2017
Posts: 7

thank you... Looks like there is not other option then. then let me either go with shared row or combine all the keys to one string with global cache.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » global cache for multiple keys
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.