-
1. Re: TreeMap
jason.greene Mar 14, 2008 7:07 PM (in response to tfranconville)Unfortunately, TreeMap is not currently supported by POJO Cache. It is on the roadmap:
http://jira.jboss.com/jira/browse/PCACHE-19
The Core Cache API though is tree based, so you could just use it directly. -
2. Re: TreeMap
genman Mar 17, 2008 4:05 PM (in response to tfranconville)TreeMap is sorted, whereas JBossCache is not.
I came up with a patch which you might apply to order your nodes:
http://jira.jboss.com/jira/browse/JBCACHE-841;jsessionid=2D6EAD361DAF7316E7C657BAAD922F5F -
3. Re: TreeMap
genman Mar 17, 2008 4:23 PM (in response to tfranconville)Er, looks like that isn't much of a patch.
But why don't you vote that issue and perhaps somebody will take a look? -
4. Re: TreeMap
jason.greene Mar 20, 2008 11:21 AM (in response to tfranconville)"tfranconville" wrote:
Ok, so it is not possible actually to use TreeMap into pojoCache.
But the pojocache inherits from treecache.
Can I use put and get methods into PojoCache.
I tried that. The use is strange.
I have tested with 3 nodes, the 3 nodes view data put by only one node.
If I stop the node from which we view data, we view data put by one of the 2 last nodes.
If I stop the node from which we view data, we view data put by the last node.
So, there is no data lost but there is not only one cache, or what ?
I have probably miss something. Who can help me ?
I am not sure I follow. Are you talking about TreeCacheAop? What version of POJO Cache/ JBoss Cache are you using? -
5. Re: TreeMap
tfranconville Mar 25, 2008 4:56 AM (in response to tfranconville)I don't see, genman, what you want to do with a ConcurrentSkipListMap.
My needed is to share several TreeMap with different order between several Jboss cluster.
I am with Jboss 4.2.1 GA, so PojoCache 1.4
The use of TreeCache seems to be a better solution for me for those TreeMaps we cannot precise (several) order into TreeCacheAop. -
6. Re: TreeMap
genman Mar 25, 2008 1:30 PM (in response to tfranconville)Although TreeCache sounds like TreeMap, it does not provide node ordering.
ConcurrentSkipListMap would replace the ConcurrentHashMap object the default Node implementation and users could provide an ordering through that interface I included with the patch. -
7. Re: TreeMap
tfranconville Mar 27, 2008 4:49 AM (in response to tfranconville)You can put complex object like TreeMap into TreeCache node. This is the solution for me. it is slow at initialization and update, but it works.
About your solution, using Jdk1.6 and JBoss Cache 2.0 is a lot of big constraints for me.
Is it possible in your solution to change the order on subtrees ?