________________________________ Da: Giacomo Fiorini Inviato: marted? 26 novembre 2013 12:16 A: s4-user@incubator.apache.org Oggetto: onRemove() method and Cache evictions
Hi, i'm currently trying to develop an application with s4 to calculate analytics for a service: number of request for every content, most requested content etc etc (similar to what Twitter example does let's say). I was experimenting with setPECache() method and it seems to me that when a PE instance is removed the onRemove() method is not called, is this normal? I see that S4 is using a LoadingCache object to manage the different PE instances, but i'm not very familiar on how it works. I want to control the life-span of my PEs and perform some operations before deleting them, how can i achieve this? On a side note i noticed that whenever i call setPECache() the metrics won't report the number of PE in cache (file myPE-cache-entries.csv always report 0 for every node). Thanks, Giacomo