AttributedExpireableCache.java
上传用户:huihesys
上传日期:2007-01-04
资源大小:3877k
文件大小:1k
源码类别:
WEB邮件程序
开发平台:
C/C++
- /* CVS ID: $Id$ */
- package net.wastl.webmail.misc;
- import java.util.*;
- /**
- * AttributedExpireableCache.java
- *
- *
- * Created: Tue Apr 25 14:57:22 2000
- *
- * @author Sebastian Schaffert
- * @version
- */
- public class AttributedExpireableCache extends ExpireableCache {
- protected Hashtable attributes;
- public AttributedExpireableCache(int capacity, float expire_factor) {
- super(capacity,expire_factor);
- attributes=new Hashtable(capacity);
- }
- public AttributedExpireableCache(int capacity) {
- super(capacity);
- attributes=new Hashtable(capacity);
- }
- public synchronized void put(Object id, Object object, Object attribs) {
- attributes.put(id,attribs);
- super.put(id,object);
- }
- public Object getAttributes(Object key) {
- return attributes.get(key);
- }
- public synchronized void remove(Object key) {
- attributes.remove(key);
- super.remove(key);
- }
- } // AttributedExpireableCache