You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Joseph Rosenblum <jo...@25thstreet.net> on 2003/11/24 08:04:02 UTC
TimerMap
Commons Developers,
The attached class is a very simple implementation of the java.util.Map
interface that gives each key a TTL (time to live) in the map. I've
found this extremely useful as a backing store for certain types of
caches (where you want to expire items based on time in cache, as
opposed to LRU, etc..) and for tracking services that I want check the
availability of. It's called TimerMap and takes a long TTL in the
constructor.
I'd love to donate this code to the commons, please let me know if you
find it useful.
-Joe
Joseph Rosenblum | 25th Street Networks
Easy, Reliable Web Hosting @ http://www.25thstreet.net/