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