Unfortunately, TreeMap is not currently supported by POJO Cache. It is on the roadmap:
The Core Cache API though is tree based, so you could just use it directly.
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?
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?
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.
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.
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 ?