I’ve been developing a Java based Enterprise application on Linux platform whose one of the functions is to generate/store a record whenever there’s a request (https) and delete the record after an expiration period. This application may have to maintain as many as 200K records (which expire at different times) at any given time. Is launching a Timer at the time of each record creation and deleting the record in the Timer callback (when the timer expires) the best solution to delete each record at its expiration ? If it is the best solution, can as many as 200K Timer instances be running at a given time ? If it’s not the best solution, what’re the possible alternatives ?
Thanks