correlation use case:
read input
if (correlation-id is already generated for this input)
{
lookup the correlation-id from the cache;
return correlation-id;
}
else
{
generate the correlation-id;
cache it;
return correlation-id;
}
Constraints: - The number of input records can go till 500K so doesn't want to use strong references. - Doesn't want to generate one-way hashes as of now (i know that if we use one-way hash then there is no need to cache)
Can someone tell me how to use ComputingMap for this. I am asking this because there is a note in the javadoc that says "it uses a identity equality for weak/soft keys".