01: /* CVS ID: $Id: AttributedExpireableCache.java,v 1.1.1.1 2002/10/02 18:42:48 wastl Exp $ */
02:
03: package net.wastl.webmail.misc;
04:
05: import java.util.*;
06:
07: /**
08: * AttributedExpireableCache.java
09: *
10: *
11: * Created: Tue Apr 25 14:57:22 2000
12: *
13: * @author Sebastian Schaffert
14: * @version
15: */
16: public class AttributedExpireableCache extends ExpireableCache {
17:
18: protected Hashtable attributes;
19:
20: public AttributedExpireableCache(int capacity, float expire_factor) {
21: super (capacity, expire_factor);
22: attributes = new Hashtable(capacity);
23: }
24:
25: public AttributedExpireableCache(int capacity) {
26: super (capacity);
27: attributes = new Hashtable(capacity);
28: }
29:
30: public synchronized void put(Object id, Object object,
31: Object attribs) {
32: attributes.put(id, attribs);
33: super .put(id, object);
34: }
35:
36: public Object getAttributes(Object key) {
37: return attributes.get(key);
38: }
39:
40: public synchronized void remove(Object key) {
41: attributes.remove(key);
42: super .remove(key);
43: }
44: } // AttributedExpireableCache
|