How to Implement CacheMap with automatic expiration of entries?
问题 Hi everyone I want to implement cache map in java in which map entries expire after given time. I have interface like this, I have to implement these methods, but I am not understand how actually start. public class CacheMapImpl implements CacheMap<Integer, String> { @Override public void setTimeToLive(long timeToLive) { } @Override public long getTimeToLive() { return 0; } @Override public String put(Integer key, String value) { return null; } @Override public void clearExpired() { }