1

I am searching for a way to make the default eviction of infinispan work with the TreeCache implementation. By now I searched the documentation and google but found nothing that fits my question. This is the current configuration of the cache in the infinispan xml:

<distributed-cache name="example">
    <transaction mode="BATCH" locking="PESSIMISTIC"/>
    <memory>
        <object size="10" />
    </memory>
</distributed-cache>

Now my question is, is there a simple way I just have not found by now or do I have to create my own EvictionManager and handle it by my self?

Felix
  • 13
  • 5

1 Answers1

2

Unfortunately, TreeMap and eviction don't mix very well together. Eviction removes the least frequently used element (for on JVM heap storage). This can remove intermediate nodes of the TreeMap causing essentially linkage errors. All parent nodes would have to be accessed when a child node is accessed to try to guarantee consistency, causing a big performance impact (not implemented).

Mudokonman
  • 856
  • 4
  • 6
  • Thus a specific eviction use case would have to be implemented to work more efficiently with TreeMap. If you wanted to implement such a thing, we would be more than welcome to help you out. http://infinispan.org/getinvolved/ – Mudokonman Oct 12 '18 at 13:38
  • Thank you very much, I already had something like that in mind but needed confirmation. I think I will at least try to create a solution for the problem. – Felix Oct 15 '18 at 05:32